/// <inheritdoc/> public ICollectionPropertyRuleBuilder <TContext, TSubject, TProperty> WithProperty <TProperty> ( Expression <Func <TSubject, IEnumerable <TProperty> > > propertyExpression) { var collectionPropertyRule = CollectionPropertyRule.CreateCollectionPropertyRule(propertyExpression, _name); _addRuleCallBack(collectionPropertyRule); return(new CollectionPropertyRuleBuilder <TContext, TSubject, TProperty> (collectionPropertyRule)); }
internal static CollectionPropertyRule CreateCollectionPropertyRule <T, TProperty> ( Expression <Func <T, TProperty> > propertyExpression, string name) where TProperty : IEnumerable { var propertyRule = new CollectionPropertyRule(propertyExpression, name) { PropertyValueDelegate = propertyExpression.Compile() }; return(propertyRule); }
internal CollectionPropertyRuleBuilder(CollectionPropertyRule collectionPropertyRule) : base(collectionPropertyRule) { _collectionPropertyRule = collectionPropertyRule; }