本文整理汇总了C#中IAcceptanceCriteria类的典型用法代码示例。如果您正苦于以下问题:C# IAcceptanceCriteria类的具体用法?C# IAcceptanceCriteria怎么用?C# IAcceptanceCriteria使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IAcceptanceCriteria类属于命名空间,在下文中一共展示了IAcceptanceCriteria类的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));
}
示例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));
}
示例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?))
)
);
}
示例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);
}
示例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)));
}
示例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)
);
}
示例7: Accept
public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
{
criteria.Expect(x => x.Type == typeof(string)).Expect(x => x.Length == 0);
}
示例8: Accept
public void Accept(IAcceptanceCriteria<IManyToOneInspector> criteria)
{
criteria.Expect(x => x.Fetch, Is.Not.Set);
}
示例9: Accept
public void Accept(IAcceptanceCriteria<IOneToManyCollectionInspector> criteria)
{
criteria.Expect(x => x.ChildType == typeof (StringWithCulture));
}
示例10: Accept
public void Accept(IAcceptanceCriteria<ICollectionInspector> criteria) {
criteria.Expect(x => _descriptors.Any(d => d.Type.Name == x.EntityType.Name));
}
示例11: Accept
// FNH has three values internally for each property (e.g. tablename)
// value set explicitly in class map
// value set by convention
// default value
// and it uses what it finds in this order valueInEffect = explicitValue ?? conventionValue ?? defaultValue
public void Accept(IAcceptanceCriteria<IClassInspector> criteria)
{
}
示例12: Accept
public void Accept(IAcceptanceCriteria<IVersionInspector> criteria)
{
criteria.Expect(x => x.Name == "Version" &&
(x.Type.GetUnderlyingSystemType() == typeof(long) ||
x.Type.GetUnderlyingSystemType() == typeof(ulong)));
}
示例13: Accept
public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
{
criteria.Expect(x => x.Property.PropertyType.IsEnum);
}
示例14: Accept
public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
{
criteria.Expect(x => x.Type == typeof(DateTime));
}
示例15: Accept
/// <summary>
/// Apply convention only to Guid types.
/// </summary>
public void Accept(IAcceptanceCriteria<IIdentityInspector> criteria)
{
criteria.Expect(id => id.Type.GetUnderlyingSystemType() == typeof(Guid));
}