コード例 #1
0
        protected virtual ICollection <IValidationRule> GetValidationRulesForState(ImportState state)
        {
            if (state == null)
            {
                throw new ArgumentNullException("state");
            }

            var type = typeof(ISateValidationRule <>).MakeGenericType(state.GetType());

            return(this._ruleFactory.GetValidationRules <ImportState>(s => this._dependencyResolver.ResolveAll(type))
                   .ToList());
        }