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


C# IAcceptanceCriteria.Expect方法代码示例

本文整理汇总了C#中IAcceptanceCriteria.Expect方法的典型用法代码示例。如果您正苦于以下问题:C# IAcceptanceCriteria.Expect方法的具体用法?C# IAcceptanceCriteria.Expect怎么用?C# IAcceptanceCriteria.Expect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAcceptanceCriteria的用法示例。


在下文中一共展示了IAcceptanceCriteria.Expect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Accept

 public void Accept(IAcceptanceCriteria<IClassInspector> criteria)
 {
     // Only run this if the table name is set
     //criteria.Expect(x => x.TableName, Is.Set);
     // Only run this if the table name contains dbo
     criteria.Expect(x => NameRequiresNormalisation(x.TableName));
 }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:7,代码来源:NormalisedTableNameConvention.cs

示例2: Accept

 public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
 {
     criteria.Expect(x => x.Property.PropertyType.IsEnum ||
                          (x.Property.PropertyType.IsGenericType &&
                           x.Property.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>) &&
                           x.Property.PropertyType.GetGenericArguments()[0].IsEnum));
 }
开发者ID:heldersk8,项目名称:VoceDirigente,代码行数:7,代码来源:ConvencaoEnum.cs

示例3: Accept

 public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria) {
     criteria.Expect(x =>
         x.Property.Name.EndsWith("Utc", StringComparison.OrdinalIgnoreCase) && (
             x.Property.PropertyType.Equals(typeof(DateTime)) ||
             x.Property.PropertyType.Equals(typeof(DateTime?))
         )
     );
 }
开发者ID:SunRobin2015,项目名称:RobinWithOrchard,代码行数:8,代码来源:UtcDateTimeConvention.cs

示例4: Accept

        /// <summary>
        /// Accepts the specified criteria.
        /// </summary>
        /// <param name="criteria">The criteria.</param>
        public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
        {
            if (criteria == null)
            {
                throw new ArgumentNullException("criteria");
            }

            criteria.Expect(x => x.Property.PropertyType.IsEnum);
        }
开发者ID:Mike343,项目名称:Netcoders,代码行数:13,代码来源:EnumConvention.cs

示例5: Accept

		/// <summary>
		/// Apply convention only to integer types.
		/// </summary>
		public void Accept(IAcceptanceCriteria<IIdentityInspector> criteria)
		{
			criteria.Expect(id => id.Type.GetUnderlyingSystemType().IsAny(
				typeof(Int16),
				typeof(Int32),
				typeof(Int64),
				typeof(UInt16),
				typeof(UInt32),
				typeof(UInt64)));
		}
开发者ID:seatwave,项目名称:Quarks,代码行数:13,代码来源:GeneratedByNative.cs

示例6: Accept

 public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
 {
     criteria.Expect(x => x.Type == typeof(bool)
         || x.Type == typeof(DateTime)
         || x.Type == typeof(int)
         || x.Type == typeof(long)
         || x.Type == typeof(short)
         || x.Type == typeof(decimal)
         || x.Type == typeof(float)
         );
 }
开发者ID:andriybilas,项目名称:MasterM,代码行数:11,代码来源:NotNullObjectConvention.cs

示例7: Accept

 public void Accept(IAcceptanceCriteria<IManyToOneInspector> criteria)
 {
     criteria.Expect(x => x.Fetch, Is.Not.Set);
 }
开发者ID:chosenmangos,项目名称:Encore,代码行数:4,代码来源:RelationshipFetchConvention.cs

示例8: Accept

 public void Accept(IAcceptanceCriteria<IClassInspector> criteria)
 {
     criteria.Expect(x => x.TableName, Is.Not.Set);
 }
开发者ID:Umaaz,项目名称:Komodo,代码行数:4,代码来源:TableNameConventions.cs

示例9: Accept

 public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
 {
     criteria
         .Expect(x => x.EntityType.GetInterfaces().Any(t => t == typeof(IAuditable)))
         .Expect(x => x.Property.Name == "UpdateAt" && x.Property.PropertyType == typeof(DateTime?));
 }
开发者ID:Ridermansb,项目名称:GenerateIdDesignerProblem,代码行数:6,代码来源:AuditablePropertiesConvention.cs

示例10: Accept

 public void Accept(IAcceptanceCriteria<IOneToManyCollectionInspector> criteria) {
     criteria.Expect(x => x.Member != null && x.Member.IsDefined(typeof(AggregateAttribute), false));
 }
开发者ID:SunRobin2015,项目名称:RobinWithOrchard,代码行数:3,代码来源:AggregateAttribute.cs

示例11: Accept

 public void Accept(IAcceptanceCriteria<ICollectionInspector> criteria) {
     criteria.Expect(x => _descriptors.Any(d => d.Type.Name == x.EntityType.Name));
 }
开发者ID:anycall,项目名称:Orchard,代码行数:3,代码来源:CacheConventions.cs

示例12: Accept

 public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
 {
     criteria.Expect(x => x.Property.PropertyType.IsEnum);
 }
开发者ID:rag2111,项目名称:Hexa.Core,代码行数:4,代码来源:EnumConvention.cs

示例13: Accept

 public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
 {
     criteria.Expect(x => x.Type == typeof(DateTime));
 }
开发者ID:ikutsin,项目名称:BinaryAnalysis.Core,代码行数:4,代码来源:DateTimeStorageConvention.cs

示例14: Accept

		/// <summary>
		/// Apply convention only to Guid types.
		/// </summary>
		public void Accept(IAcceptanceCriteria<IIdentityInspector> criteria)
		{
			criteria.Expect(id => id.Type.GetUnderlyingSystemType() == typeof(Guid));
		}
开发者ID:shaynevanasperen,项目名称:Data.Operations,代码行数:7,代码来源:GeneratedByAssigned.cs

示例15: Accept

		public void Accept(IAcceptanceCriteria<IClassInspector> criteria)
		{
			criteria.Expect(x => !x.LazyLoad && !anyLazyMembers(x));
		}
开发者ID:seatwave,项目名称:Quarks,代码行数:4,代码来源:NotLazyLoad.cs


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