Пример #1
0
 public void Apply(ITypePropertyConventionContext context)
 {
     if (context.Member.PropertyInfo.PropertyType == typeof(string))
     {
         context.SetValue(string.Empty);
     }
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     if (context.Member.PropertyInfo.PropertyType == typeof(string))
     {
         context.SetValue(string.Empty);
     }
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     if (context.Member.PropertyInfo.PropertyType == typeof(int))
     {
         context.SetValue(0);
     }
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     if (context.Member.PropertyInfo.PropertyType == typeof(int))
     {
         context.SetValue(0);
     }
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     if (context.Member.PropertyInfo.Name == "Id" &&
         typeof(ModelBase).IsAssignableFrom(context.Member.PropertyInfo.DeclaringType))
     {
         context.SetSource <ModelIdSource>();
     }
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     if (context.Member.PropertyInfo.PropertyType == typeof(string))
     {
         context.SetValue("2");
     }
     else if (context.Member.PropertyInfo.PropertyType == typeof(int?))
     {
         context.SetValue(2);
     }
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource(typeof (AutoSource<>).MakeGenericType(context.Member.PropertyInfo.PropertyType));
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetValue("Test");
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource <StateSource>();
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetValue(Guid.NewGuid());
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource<RandomNullableSingleDataSource>();
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetValue(DateTime.MinValue);
 }
Пример #13
0
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource <TestDataSource>();
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetValue("Test");
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource<EmailAddressSource>();
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetValue(DateTime.MinValue);
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     if (context.Member.PropertyInfo.PropertyType == typeof(string))
     {
         context.SetValue("2");
     }
     else if (context.Member.PropertyInfo.PropertyType == typeof(int?))
     {
         context.SetValue(2);
     }
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource <PostalCodeSource>();
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource <EmailAddressSource>();
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource <PasswordSource>();
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource<FloatSource>();
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource<RandomBooleanDataSource>();
 }
Пример #23
0
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource(typeof(AutoSource <>).MakeGenericType(context.Member.PropertyInfo.PropertyType));
 }
 public void Apply(ITypePropertyConventionContext context)
 {
     context.SetSource<PostalCodeSource>();
 }