本文整理汇总了C#中ASC.Core.Tenants.Tenant类的典型用法代码示例。如果您正苦于以下问题:C# Tenant类的具体用法?C# Tenant怎么用?C# Tenant使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Tenant类属于ASC.Core.Tenants命名空间,在下文中一共展示了Tenant类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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())
}
};
}
示例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();
}
示例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;
}
示例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();
}
示例5: BackupPortalTask
public BackupPortalTask(Tenant tenant, string fromConfigPath, string toFilePath)
: base(tenant, fromConfigPath)
{
if (string.IsNullOrEmpty(toFilePath))
throw new ArgumentNullException("toFilePath");
BackupFilePath = toFilePath;
}
示例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();
}
示例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;
}
示例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();
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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>()};
}
示例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);
}
示例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());
}