本文整理汇总了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));
}
示例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<IManyToOneInspector> criteria)
{
criteria.Expect(x => x.Fetch, Is.Not.Set);
}
示例8: Accept
public void Accept(IAcceptanceCriteria<IClassInspector> criteria)
{
criteria.Expect(x => x.TableName, Is.Not.Set);
}
示例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?));
}
示例10: Accept
public void Accept(IAcceptanceCriteria<IOneToManyCollectionInspector> criteria) {
criteria.Expect(x => x.Member != null && x.Member.IsDefined(typeof(AggregateAttribute), false));
}
示例11: Accept
public void Accept(IAcceptanceCriteria<ICollectionInspector> criteria) {
criteria.Expect(x => _descriptors.Any(d => d.Type.Name == x.EntityType.Name));
}
示例12: Accept
public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
{
criteria.Expect(x => x.Property.PropertyType.IsEnum);
}
示例13: Accept
public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
{
criteria.Expect(x => x.Type == typeof(DateTime));
}
示例14: Accept
/// <summary>
/// Apply convention only to Guid types.
/// </summary>
public void Accept(IAcceptanceCriteria<IIdentityInspector> criteria)
{
criteria.Expect(id => id.Type.GetUnderlyingSystemType() == typeof(Guid));
}
示例15: Accept
public void Accept(IAcceptanceCriteria<IClassInspector> criteria)
{
criteria.Expect(x => !x.LazyLoad && !anyLazyMembers(x));
}