当前位置: 首页>>代码示例>>C#>>正文


C# TemplateType类代码示例

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


TemplateType类属于命名空间,在下文中一共展示了TemplateType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


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