本文整理汇总了C#中TemplateType类的典型用法代码示例。如果您正苦于以下问题:C# TemplateType类的具体用法?C# TemplateType怎么用?C# TemplateType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TemplateType类属于命名空间,在下文中一共展示了TemplateType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetTemplatesForAnyOrganization
public static IList<DocTemplate> GetTemplatesForAnyOrganization(IUnitOfWork uow, TemplateType type)
{
return uow.Session.QueryOver<DocTemplate> ()
.Where(x => x.TemplateType == type)
.Where(x => x.Organization == null)
.List<DocTemplate> ();
}
开发者ID:QualitySolution,项目名称:Vodovoz,代码行数:7,代码来源:DocTemplateRepository.cs
示例2: GetTemplatesOnlyForOrganization
public static IList<DocTemplate> GetTemplatesOnlyForOrganization(IUnitOfWork uow, TemplateType type, Organization org)
{
return uow.Session.QueryOver<DocTemplate> ()
.Where(x => x.TemplateType == type)
.Where(x => x.Organization == org)
.List<DocTemplate> ();
}
开发者ID:QualitySolution,项目名称:Vodovoz,代码行数:7,代码来源:DocTemplateRepository.cs
示例3: BuildEmail
private async Task<Email> BuildEmail(IUserDto user, TemplateType templateType, string token)
{
var email = new Email { Subject = String.Empty };
var bodyBuilder = new StringBuilder(200);
using (StreamReader reader = _templateProvider.GetTemplate(templateType))
{
string line = await reader.ReadLineAsync();
for (int i = 0; line != null; i++)
{
if (i == 0)
{
email.Subject = ReplaceMetaTagsWithUserData(line, user, token);
}
else
{
bodyBuilder.AppendLine(ReplaceMetaTagsWithUserData(line, user, token));
}
line = await reader.ReadLineAsync();
}
}
email.Body = bodyBuilder.ToString();
return email;
}
开发者ID:WadeOne,项目名称:EasyTeach,代码行数:26,代码来源:EmailBuilder.cs
示例4: TemplatePage
protected TemplatePage()
: base()
{
templateClasses = TemplateClasses.U;
templateType = TemplateType.U;
templateGuid = "";
}
开发者ID:foresightbrand,项目名称:kebibi,代码行数:7,代码来源:TemplatePage.cs
示例5: UninstallAction
/// <summary>
/// Constructor to handle the creation of an uninstall action with all information passed in.
/// </summary>
/// <param name="os"></param>
/// <param name="template"></param>
/// <param name="arch"></param>
/// <param name="productcode"></param>
/// <param name="wixobj"></param>
public UninstallAction(ICollection<OperatingSystemConfiguration> os, TemplateType template, ICollection<ArchitectureConfiguration> arch, string productcode, WixObjectType wixobj)
{
Template = template;
Architectures = arch;
ProductCode = productcode;
WixObject = wixobj;
OS = os;
}
开发者ID:BlackMizi,项目名称:VisualStudioUninstaller,代码行数:16,代码来源:UninstallAction.cs
示例6: FindDefaultTemplate
public static ICodeTemplate FindDefaultTemplate(TemplateType templateType, Session session, Type codeTemplateType, CodeDomProvider codeDomProvider){
const ICodeTemplate template = null;
var binaryOperator = new BinaryOperator(template.GetPropertyName(x => x.TemplateType),templateType);
var isDefault = new BinaryOperator(template.GetPropertyName(x => x.IsDefault),true);
var provider = new BinaryOperator(template.GetPropertyName(x => x.CodeDomProvider),codeDomProvider);
return session.FindObject(PersistentCriteriaEvaluationBehavior.InTransaction,
codeTemplateType, new GroupOperator(binaryOperator, isDefault,provider))
as ICodeTemplate;
}
开发者ID:akingunes,项目名称:eXpand,代码行数:9,代码来源:CodeTemplateQuery.cs
示例7: CreateClassInfo
public IPersistentClassInfo CreateClassInfo(string name, TemplateType templateType = TemplateType.Class) {
var persistentClassInfo = _objectSpace.CreateWCObject<IPersistentClassInfo>();
_persistentAssemblyInfo.PersistentClassInfos.Add(persistentClassInfo);
persistentClassInfo.SetDefaultTemplate(templateType);
persistentClassInfo.Name = GetTableName(name);
persistentClassInfo.PersistentAssemblyInfo = _persistentAssemblyInfo;
persistentClassInfo.BaseType = typeof(XPLiteObject);
return persistentClassInfo;
}
开发者ID:aries544,项目名称:eXpand,代码行数:9,代码来源:ClassGenerator.cs
示例8: GridViewAuditActionTemplate
internal GridViewAuditActionTemplate(
TemplateType type,
string columnName,
string headerText)
{
_columnName = columnName;
_headerText = headerText;
_type = type;
}
开发者ID:marteaga,项目名称:healthvault-azurestorage,代码行数:9,代码来源:GridViewAuditActionTemplate.cs
示例9: TemplateKey
/// <summary> Constructor (called by derived classes only) </summary>
protected TemplateKey(TemplateType templateType, object dataType)
{
Exception ex = ValidateDataType(dataType, "dataType");
if (ex != null)
throw ex;
_dataType = dataType;
_templateType = templateType;
}
开发者ID:JianwenSun,项目名称:cc,代码行数:10,代码来源:TemplateKey.cs
示例10: GetTemplate
/// <summary>
/// Получаем первый подходящий шаболон документа по указанным критериям.
/// </summary>
public static DocTemplate GetTemplate(IUnitOfWork uow, TemplateType type, Organization org)
{
var forOrg = GetTemplatesOnlyForOrganization(uow, type, org);
if (forOrg.Count > 0)
return forOrg.First();
var any = GetTemplatesForAnyOrganization(uow, type);
return any.FirstOrDefault();
}
开发者ID:QualitySolution,项目名称:Vodovoz,代码行数:12,代码来源:DocTemplateRepository.cs
示例11: SetDefaultTemplate
public static void SetDefaultTemplate(this IPersistentMemberInfo persistentMemberInfo, TemplateType templateType)
{
persistentMemberInfo.CodeTemplateInfo =
(ICodeTemplateInfo)Activator.CreateInstance(TypesInfo.Instance.CodeTemplateInfoType, persistentMemberInfo.Session);
ICodeTemplate defaultTemplate = CodeTemplateBuilder.CreateDefaultTemplate(templateType, persistentMemberInfo.Session,
TypesInfo.Instance.CodeTemplateType,
persistentMemberInfo.Owner.PersistentAssemblyInfo.CodeDomProvider);
persistentMemberInfo.CodeTemplateInfo.CodeTemplate = defaultTemplate;
}
开发者ID:cevious,项目名称:eXpand,代码行数:10,代码来源:IPersistentMemberInfoExtensions.cs
示例12: CreateMembersCore
IEnumerable<MemberGeneratorInfo> CreateMembersCore(IEnumerable<DBColumn> dbColumns, IPersistentClassInfo persistentClassInfo = null, TemplateType coreTemplateType = TemplateType.XPReadWritePropertyMember, TemplateType refTemplateType = TemplateType.XPReadWritePropertyMember) {
return dbColumns.SelectMany(dbColumn => {
var memberGeneratorInfos = new List<MemberGeneratorInfo>();
if (IsOneToOneOnTheKey(dbColumn) && coreTemplateType != TemplateType.ReadWriteMember) {
memberGeneratorInfos.Add(CreateFkMember(dbColumn, persistentClassInfo, coreTemplateType, TemplateType.XPOneToOneReadOnlyPropertyMember));
}
memberGeneratorInfos.Add(CreateMember(dbColumn, persistentClassInfo, coreTemplateType, refTemplateType));
return memberGeneratorInfos;
}).Where(info => info.PersistentMemberInfo != null);
}
开发者ID:jdraith1,项目名称:eXpand,代码行数:10,代码来源:MemberGenerator.cs
示例13: SetDefaultTemplate
public static void SetDefaultTemplate(this IPersistentTemplatedTypeInfo persistentMemberInfo, TemplateType templateType) {
var objectSpace = ObjectSpace.FindObjectSpaceByObject(persistentMemberInfo);
persistentMemberInfo.CodeTemplateInfo = objectSpace.CreateWCObject<ICodeTemplateInfo>();
ICodeTemplate defaultTemplate = CodeTemplateBuilder.CreateDefaultTemplate(templateType, persistentMemberInfo.Session,
WCTypesInfo.Instance.FindBussinessObjectType<ICodeTemplate>(),
GetProvider(persistentMemberInfo));
persistentMemberInfo.CodeTemplateInfo.CodeTemplate = defaultTemplate;
persistentMemberInfo.CodeTemplateInfo.CloneProperties();
}
开发者ID:krazana,项目名称:eXpand,代码行数:10,代码来源:IPersistentTemplatedTypeInfoExtensions.cs
示例14: SetDefaultTemplate
public static void SetDefaultTemplate(this IPersistentTemplatedTypeInfo persistentMemberInfo, TemplateType templateType) {
var objectType = WCTypesInfo.Instance.FindBussinessObjectType<ICodeTemplateInfo>();
persistentMemberInfo.CodeTemplateInfo = (ICodeTemplateInfo)objectType.CreateInstance(new object[] { persistentMemberInfo.Session });
var defaultTemplate = CodeTemplateBuilder.CreateDefaultTemplate(templateType, persistentMemberInfo.Session,
WCTypesInfo.Instance.FindBussinessObjectType<ICodeTemplate>(),
GetProvider(persistentMemberInfo));
persistentMemberInfo.CodeTemplateInfo.CodeTemplate = defaultTemplate;
persistentMemberInfo.CodeTemplateInfo.CloneProperties();
}
开发者ID:aries544,项目名称:eXpand,代码行数:10,代码来源:IPersistentTemplatedTypeInfoExtensions.cs
示例15: Init
public void Init(string columnName, TemplateType ttype, string guideColumns, QuestColumnType columnType)
{
strQuestColumnName = columnName;
nQuestColumnValue = 0;
type = ttype;
strGuideColumnNames = guideColumns;
strGuideColumnValues = string.Empty;
emQuestColumnType = columnType;
}
开发者ID:viticm,项目名称:pap2,代码行数:10,代码来源:KQuestDirect.cs
示例16: CreatePersistentClassInfo
IPersistentClassInfo CreatePersistentClassInfo(string name, TemplateType templateType, IPersistentAssemblyInfo persistentAssemblyInfo) {
var findBussinessObjectType = WCTypesInfo.Instance.FindBussinessObjectType<IPersistentClassInfo>();
var info = _objectSpace.Session.FindObject(PersistentCriteriaEvaluationBehavior.InTransaction,
findBussinessObjectType, CriteriaOperator.Parse("Name=?", name)) as IPersistentClassInfo;
if (info != null)
return info;
var persistentClassInfo = CreateNew(name);
persistentAssemblyInfo.PersistentClassInfos.Add(persistentClassInfo);
persistentClassInfo.SetDefaultTemplate(templateType);
return persistentClassInfo;
}
开发者ID:kamchung322,项目名称:eXpand,代码行数:11,代码来源:TableMapper.cs
示例17: GridViewIsSignedTemplate
internal GridViewIsSignedTemplate(
TemplateType type,
string columnName,
string headerText,
string isSignedOverride)
{
_columnName = columnName;
_headerText = headerText;
_isSignedOverride = isSignedOverride;
_type = type;
}
开发者ID:marteaga,项目名称:healthvault-azurestorage,代码行数:11,代码来源:GridViewIsSignedTemplate.cs
示例18: CreateDefaultTemplate
public static ICodeTemplate CreateDefaultTemplate(TemplateType templateType, Session session, Type codeTemplateType, CodeDomProvider codeDomProvider)
{
var defaultTemplate = CodeTemplateQuery.FindDefaultTemplate(templateType, session, codeTemplateType,codeDomProvider);
if (defaultTemplate== null) {
defaultTemplate = (ICodeTemplate)Activator.CreateInstance(codeTemplateType, session);
defaultTemplate.IsDefault = true;
defaultTemplate.TemplateType=templateType;
defaultTemplate.CodeDomProvider=codeDomProvider;
defaultTemplate.SetDefaults();
}
return defaultTemplate;
}
开发者ID:cevious,项目名称:eXpand,代码行数:12,代码来源:CodeTemplateBuilder.cs
示例19: GetTemplates
private static IEnumerable<Template> GetTemplates(IEnumerable<FilePath> directories, TemplateType type)
{
foreach (var directory in directories)
{
foreach (var file in Directory.GetFiles(directory.FullPath, "*.template", SearchOption.AllDirectories))
{
var template = Template.FromFile(new FilePath(file));
if (template.Type == type)
yield return template;
}
}
}
开发者ID:die-Deutsche-Orthopaedie,项目名称:LiteDevelop,代码行数:12,代码来源:TemplateService.cs
示例20: Render
protected override void Render(HtmlTextWriter writer)
{
if (this.Page is TemplatePage)
{
tempClass = ((TemplatePage)this.Page).TemplateClasses;
tempType = ((TemplatePage)this.Page).TemplateType;
}
foreach (Template temp in Template.List(tempClass,tempType))
{
writer.Write(String.Format(listFormat, temp.Guid, temp.Title, temp.Classes.ToString(), temp.Type.ToString(),temp.IsDefault.ToString()));
}
}
开发者ID:foresightbrand,项目名称:kebibi,代码行数:13,代码来源:TemplateList.cs
注:本文中的TemplateType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论