• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Tenants.Tenant类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ASC.Core.Tenants.Tenant的典型用法代码示例。如果您正苦于以下问题:C# Tenant类的具体用法?C# Tenant怎么用?C# Tenant使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Tenant类属于ASC.Core.Tenants命名空间,在下文中一共展示了Tenant类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ParseRequestInfo

        protected override ApiRequest ParseRequestInfo(IDictionary<string, string> groups, Tenant t)
        {
            var type = groups["type"];
            if (type == "task")
            {
                return new ApiRequest(string.Format("project/{0}/task", groups["projectId"]))
                {
                    Parameters = new List<RequestParameter>
                        {
                            new RequestParameter("description", new PlainTextContentResolver()),
                            new RequestParameter("deadline", new TaskDeadlineResolver()),
                            new RequestParameter("priority", new TaskPriorityResolver()),
                            new RequestParameter("milestoneid", new TaskMilestoneResolver()),
                            new RequestParameter("responsibles", new TaskResponsiblesResolver()),
                            new RequestParameter("responsible", new TaskResponsibleResolver()),
                            new RequestParameter("title", new TitleResolver(TaskDeadlineResolver.Pattern, TaskPriorityResolver.Pattern, TaskMilestoneResolver.Pattern, TaskResponsiblesResolver.Pattern))
                        }
                };
            }

            return new ApiRequest(string.Format("project/{0}/message", groups["projectId"]))
                {
                    Parameters = new List<RequestParameter>
                        {
                            new RequestParameter("title", new TitleResolver()),
                            new RequestParameter("content", new HtmlContentResolver())
                        }
                };
        }
开发者ID:vipwan,项目名称:CommunityServer,代码行数:29,代码来源:ProjectAddressParser.cs


示例2: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     AjaxPro.Utility.RegisterTypeForAjax(this.GetType());
     Page.ClientScript.RegisterClientScriptInclude(typeof(string), "TimeAndLanguage_script", WebPath.GetPath("usercontrols/management/TimeAndLanguage/js/TimeAndLanguage.js"));
     Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "TimeAndLanguage_style", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + WebSkin.GetUserSkin().GetAbsoluteWebPath("usercontrols/management/TimeAndLanguage/css/<theme_folder>/TimeAndLanguage.css") + "\">", false);
     _currentTenant = CoreContext.TenantManager.GetCurrentTenant();
 }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:7,代码来源:TimeAndLanguage.ascx.cs


示例3: FileMoveCopyOperation

 public FileMoveCopyOperation(Tenant tenant, List<object> folders, List<object> files, object toFolder, bool copy, FileConflictResolveType resolveType)
     : base(tenant, folders, files)
 {
     this._toFolder = toFolder;
     this._copy = copy;
     this._resolveType = resolveType;
 }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:7,代码来源:FileMoveCopyOperation.cs


示例4: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(GetType());

            Page.ClientScript.RegisterClientScriptInclude(typeof(string), "firsttime1_script", WebPath.GetPath("usercontrols/firsttime/js/manager.js"));

            _curTenant = CoreContext.TenantManager.GetCurrentTenant();
        }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:8,代码来源:EmailAndPassword.ascx.cs


示例5: BackupPortalTask

        public BackupPortalTask(Tenant tenant, string fromConfigPath, string toFilePath)
            : base(tenant, fromConfigPath)
        {
            if (string.IsNullOrEmpty(toFilePath))
                throw new ArgumentNullException("toFilePath");

            BackupFilePath = toFilePath;
        }
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:8,代码来源:BackupPortalTask.cs


示例6: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(this.GetType());
            Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "accountlink_script", WebPath.GetPath("usercontrols/users/userprofile/js/usersettings.js"));
            _userSkinSettings.Controls.Add(LoadControl(SkinSettings.Location));
            _currentTenant = CoreContext.TenantManager.GetCurrentTenant();

        }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:8,代码来源:UserCustomisationControl.ascx.cs


示例7: FileDownloadOperation

        public FileDownloadOperation(Tenant tenant, Dictionary<object, string> folders, Dictionary<object, string> files)
            : base(tenant, folders.Select(f => f.Key).ToList(), files.Select(f => f.Key).ToList())
        {
            Id = Owner.ToString() + OperationType.ToString(); //one download per user

            _files = files;

            _quotaDocsEdition = TenantExtra.GetTenantQuota().DocsEdition;
        }
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:9,代码来源:FileDownloadOperation.cs


示例8: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(GetType());
            Page.RegisterBodyScripts(ResolveUrl("~/usercontrols/management/TimeAndLanguage/js/TimeAndLanguage.js"));

            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/usercontrols/management/TimeAndLanguage/css/TimeAndLanguage.less"));

            _currentTenant = CoreContext.TenantManager.GetCurrentTenant();
        }
开发者ID:vipwan,项目名称:CommunityServer,代码行数:9,代码来源:TimeAndLanguage.ascx.cs


示例9: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(GetType());
            
            InitScript();

            _curTenant = CoreContext.TenantManager.GetCurrentTenant();
            _dateandtimeHolder.Controls.Add(LoadControl(TimeAndLanguage.Location));

            IsVisibleTestData = SetupInfo.PortalTestDataEnable;
        }
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:11,代码来源:EmailAndPassword.ascx.cs


示例10: TransferProgressItem

        public TransferProgressItem(ILog log, int tenantId, string targetRegion)
            : base(log, tenantId)
        {
            if (string.IsNullOrEmpty(targetRegion))
                throw new ArgumentException("Empty target region.", "targetRegion");

            this.targetRegion = targetRegion;

            TransferMail = true;
            tenant = CoreContext.TenantManager.GetTenant(tenantId);
        }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:11,代码来源:TransferProgressItem.cs


示例11: FileMoveCopyOperation

 public FileMoveCopyOperation(Tenant tenant,
                              List<object> folders,
                              List<object> files,
                              string toFolderId,
                              bool copy,
                              FileConflictResolveType resolveType,
                              Dictionary<string, string> httpRequestHeaders)
     : this(tenant, folders, files, toFolderId, copy, resolveType)
 {
     this.httpRequestHeaders = httpRequestHeaders;
 }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:11,代码来源:FileMoveCopyOperation.cs


示例12: TransferPortalTask

        public TransferPortalTask(Tenant tenant, string fromConfigPath, string toConfigPath)
            : base(tenant, fromConfigPath)
        {
            if (toConfigPath == null)
                throw new ArgumentNullException("toConfigPath");

            ToConfigPath = toConfigPath;

            DeleteBackupFileAfterCompletion = true;
            BlockOldPortalAfterStart = true;
            DeleteOldPortalAfterCompletion = true;
        }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:12,代码来源:TransferPortalTask.cs


示例13: ParseRequestInfo

        protected override ApiRequest ParseRequestInfo(IDictionary<string,string> groups, Tenant t)
        {
            var folder = groups["folder"];
            
            int id;
            if (!int.TryParse(folder, out id))
            {
                folder = '@' + folder;
            }

            return new ApiRequest(string.Format("files/{0}/upload", folder)) {FilesToPost = new List<RequestFileInfo>()};
        }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:12,代码来源:FileAddressParser.cs


示例14: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(GetType());

            InitScript();

            _curTenant = CoreContext.TenantManager.GetCurrentTenant();

            var timeAndLanguage = (TimeAndLanguage)LoadControl(TimeAndLanguage.Location);
            timeAndLanguage.WithoutButton = true;
            _dateandtimeHolder.Controls.Add(timeAndLanguage);
        }
开发者ID:vipwan,项目名称:CommunityServer,代码行数:12,代码来源:EmailAndPassword.ascx.cs


示例15: FileOperation

        protected FileOperation(Tenant tenant, List<object> folders, List<object> files)
        {
            if (tenant == null) throw new ArgumentNullException("tenant");

            Id = Guid.NewGuid().ToString();
            CurrentTenant = tenant;
            Owner = ASC.Core.SecurityContext.CurrentAccount.ID;
            principal = Thread.CurrentPrincipal;
            culture = Thread.CurrentThread.CurrentCulture.Name;

            Folders = folders ?? new List<object>();
            Files = files ?? new List<object>();
            Source = string.Join(splitCharacter, Folders.Select(f => "folder_" + f).Concat(Files.Select(f => "file_" + f)).ToArray());
        }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:14,代码来源:FileOperation.cs


示例16: SetTenantVersion

 public Tenant SetTenantVersion(Tenant tenant, int version)
 {
     if (tenant == null) throw new ArgumentNullException("tenant");
     if (tenant.Version != version)
     {
         tenant.Version = version;
         SaveTenant(tenant);
     }
     else
     {
         throw new ArgumentException("This is current version already");
     }
     return tenant;
 }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:14,代码来源:ClientTenantManager.cs


示例17: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(this.GetType());

            Page.RegisterBodyScripts(ResolveUrl("~/usercontrols/management/maildomainsettings/js/maildomainsettings.js"));
            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/usercontrols/management/maildomainsettings/css/maildomainsettings.less"));

            _currentTenant = CoreContext.TenantManager.GetCurrentTenant();
            _studioTrustedDomainSettings = SettingsManager.Instance.LoadSettings<StudioTrustedDomainSettings>(TenantProvider.CurrentTenantID);
            _enableInviteUsers = TenantStatisticsProvider.GetUsersCount() < TenantExtra.GetTenantQuota().ActiveUsers;

            if (!_enableInviteUsers)
                _studioTrustedDomainSettings.InviteUsersAsVisitors = true;
        }
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:14,代码来源:MailDomainSettings.ascx.cs


示例18: FileImportOperation

        public FileImportOperation(Tenant tenant, IDocumentProvider docProvider, List<DataToImport> files, object parentId, bool overwrite, string folderName)
            : base(tenant, null, null)
        {
            Id = Owner.ToString() + OperationType.ToString();
            Source = docProvider.Name;
            _docProvider = docProvider;
            _files = files ?? new List<DataToImport>();
            _parentId = parentId;
            _overwrite = overwrite;
            _folderName = folderName;

            var toFolderObj = Global.DaoFactory.GetFolderDao().GetFolder(_parentId);

            if (toFolderObj != null && toFolderObj.RootFolderType == FolderType.BUNCH)
                _markAsNewRecipientIDs = Global.GetProjectTeam(toFolderObj).ToList();
        }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:16,代码来源:FileImportOperation.cs


示例19: ParseRequestInfo

        protected override ApiRequest ParseRequestInfo(IDictionary<string,string> groups, Tenant t)
        {
            var callInfo = new ApiRequest("community/" + groups["type"])
                {
                    Parameters = new List<RequestParameter>
                        {
                            new RequestParameter("content", new HtmlContentResolver()),
                            new RequestParameter("title", new TitleResolver(BlogTagsResolver.Pattern)),
                            new RequestParameter("subscribeComments", true),
                            new RequestParameter("type", 1),
                            new RequestParameter("tags", new BlogTagsResolver())
                        }
                };

            return callInfo;
        }
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:16,代码来源:CommunityAddressParser.cs


示例20: Search

        public TextSearchResult Search(string query, Tenant tenant)
        {
            var result = new TextSearchResult(module);

            if (string.IsNullOrEmpty(query) || !Directory.Exists(path))
            {
                return result;
            }

            var dir = Lucene.Net.Store.FSDirectory.Open(new DirectoryInfo(path));
            var searcher = new IndexSearcher(dir, false);
            try
            {
                var analyzer = new AnalyzersProvider().GetAnalyzer(tenant.GetCulture().TwoLetterISOLanguageName);
                var parser = new QueryParser(Lucene.Net.Util.Version.LUCENE_29, "Text", analyzer);
                parser.SetDefaultOperator(QueryParser.Operator.AND);
                if (TextIndexCfg.MaxQueryLength < query.Length)
                {
                    query = query.Substring(0, TextIndexCfg.MaxQueryLength);
                }
                Query q = null;
                try
                {
                    q = parser.Parse(query);
                }
                catch (Lucene.Net.QueryParsers.ParseException) { }
                if (q == null)
                {
                    q = parser.Parse(QueryParser.Escape(query));
                }

#pragma warning disable 618
                var hits = searcher.Search(q);
#pragma warning restore 618
                for (int i = 0; i < hits.Length(); i++)
                {
                    var doc = hits.Doc(i);
                    result.AddIdentifier(doc.Get("Id"));
                }
            }
            finally
            {
                searcher.Close();
                dir.Close();
            }
            return result;
        }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:47,代码来源:TextSearcher.cs



注:本文中的ASC.Core.Tenants.Tenant类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Users.UserInfo类代码示例发布时间:2022-05-24
下一篇:
C# Expressions.Exp类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap