コード例 #1
0
        /// <summary>
        /// Creates the state dictionary containing all the attribute base validation results for the provided arguments.
        /// </summary>
        /// <param name="argument">The argument to validate.</param>
        /// <returns>InputModelStateDictionary.</returns>
        public InputModelStateDictionary CreateStateDictionary(ExecutionArgument argument)
        {
            var dictionary = new InputModelStateDictionary();
            var entry      = this.ValidateSingleArgument(argument);

            dictionary.Add(entry);

            return(dictionary);
        }
コード例 #2
0
        /// <summary>
        /// Creates the state dictionary containing all the attribute base validation results for the provided arguments.
        /// </summary>
        /// <param name="arguments">The arguments.</param>
        /// <returns>InputModelStateDictionary.</returns>
        public InputModelStateDictionary CreateStateDictionary(IEnumerable <ExecutionArgument> arguments)
        {
            var dictionary = new InputModelStateDictionary();

            if (arguments != null)
            {
                foreach (var argument in arguments)
                {
                    var entry = this.ValidateSingleArgument(argument);
                    dictionary.Add(entry);
                }
            }

            return(dictionary);
        }