public ApiContractResolver(IApiVersionAccessor versionAccessor) { ArgCheck.NotNull(nameof(versionAccessor), versionAccessor); PropertyPredicates.Add(new EmptyArrayPredicate()); PropertyPredicates.Add(new ReadWritePredicate()); PropertyPredicates.Add(new VersionedApiPredicate(versionAccessor)); }
/// <summary> /// Filters the properties that this convention applies to based on a predicate. /// </summary> /// <param name="predicate">A function to test each property for a condition.</param> /// <returns>The same instance of <see cref="T:AA.Dapper.FluentMap.Conventions.PropertyConventionConfiguration"/>.</returns> public PropertyConventionConfiguration Where(Func <PropertyInfo, bool> predicate) { PropertyPredicates.Add(predicate); return(this); }
public PredicateContractResolver(IEnumerable <IPropertyPredicate> propertyPredicates) { ArgCheck.NotNull(nameof(propertyPredicates), propertyPredicates); PropertyPredicates.AddRange(propertyPredicates.WhereNotNull()); }