コード例 #1
0
        /// <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));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 internal CollectionPropertyRuleBuilder(CollectionPropertyRule collectionPropertyRule)
     : base(collectionPropertyRule)
 {
     _collectionPropertyRule = collectionPropertyRule;
 }