Ejemplo n.º 1
0
 public static IfFilterExpression IfPropertyIs <TType>(
     this ConventionExpression conventionExpression,
     Expression <Func <TType, object> > expression) where TType : class
 {
     return(conventionExpression.IfProperty(p =>
                                            p.DeclaringType == typeof(TType) &&
                                            p.Name == expression.ToAccessor().Name));
 }
Ejemplo n.º 2
0
 public static IfFilterExpression IfPropertyImplements(
     this ConventionExpression conventionExpression,
     Type typeImplemented)
 {
     return(conventionExpression.IfProperty(p =>
                                            p.PropertyType.Implements(typeImplemented) ||
                                            p.PropertyType.ImplementsGenericOf(typeImplemented)));
 }
Ejemplo n.º 3
0
 public static IfFilterExpression IfPropertyNameIs(
     this ConventionExpression conventionExpression, string propertyName)
 {
     return(conventionExpression.IfProperty(p => p.Name == propertyName));
 }
Ejemplo n.º 4
0
 public static IfFilterExpression IfPropertyImplementsEnumerableOf <TType>(
     this ConventionExpression conventionExpression)
 {
     return(conventionExpression.IfProperty(p => p.PropertyType.ImplementsEnumerableOf <TType>()));
 }
Ejemplo n.º 5
0
 public static IfFilterExpression IfPropertyTypeIs <TType>(this ConventionExpression conventionExpression)
 {
     return(conventionExpression.IfProperty(p => p.PropertyType == typeof(TType)));
 }
Ejemplo n.º 6
0
 public static IfFilterExpression IfPropertyNameEnds(
     this ConventionExpression conventionExpression, string propertyNameEnd)
 {
     return(conventionExpression.IfProperty(p => p.Name.EndsWith(propertyNameEnd)));
 }