Ejemplo n.º 1
0
 public ConventionFilterTypesBinder WithSuffix(string suffix)
 {
     BindInfo.AddTypeFilter(t => t.Name.EndsWith(suffix));
     return(this);
 }
Ejemplo n.º 2
0
 public ConventionFilterTypesBinder Where(Func <Type, bool> predicate)
 {
     BindInfo.AddTypeFilter(predicate);
     return(this);
 }
Ejemplo n.º 3
0
 public ConventionFilterTypesBinder InNamespaces(IEnumerable <string> namespaces)
 {
     BindInfo.AddTypeFilter(t => namespaces.Any(n => IsInNamespace(t, n)));
     return(this);
 }
Ejemplo n.º 4
0
 public ConventionFilterTypesBinder WithAttributeWhere <T>(Func <T, bool> predicate)
     where T : Attribute
 {
     BindInfo.AddTypeFilter(t => t.HasAttribute <T>() && t.AllAttributes <T>().All(predicate));
     return(this);
 }
Ejemplo n.º 5
0
 public ConventionFilterTypesBinder WithoutAttribute(Type attribute)
 {
     Assert.That(attribute.DerivesFrom <Attribute>());
     BindInfo.AddTypeFilter(t => !t.HasAttribute(attribute));
     return(this);
 }
Ejemplo n.º 6
0
 public ConventionFilterTypesBinder DerivingFrom(Type parentType)
 {
     BindInfo.AddTypeFilter((type) => type.DerivesFrom(parentType));
     return(this);
 }
Ejemplo n.º 7
0
 public ConventionFilterTypesBinder MatchingRegex(Regex regex)
 {
     BindInfo.AddTypeFilter(t => regex.IsMatch(t.Name));
     return(this);
 }
Ejemplo n.º 8
0
 public ConventionFilterTypesBinder WithPrefix(string prefix)
 {
     BindInfo.AddTypeFilter(t => t.Name.StartsWith(prefix));
     return(this);
 }