Ejemplo n.º 1
0
        public static InputCollection Create(IDictionary <string, object> parameters)
        {
            var result = new InputCollection();

            foreach (var parameter in parameters)
            {
                result.AddParameter(parameter.Key, parameter.Value, null);
            }
            return(result);
        }
Ejemplo n.º 2
0
        public static InputCollection Create(params InputParameter[] parameters)
        {
            var result = new InputCollection();

            foreach (var parameter in parameters)
            {
                result.AddParameter(parameter.Name, parameter.Value, parameter.Configuration);
            }
            return(result);
        }
        private static InputCollection Add(this InputCollection collection, string name, object value, ParameterConfiguration factory = null)
        {
            if (collection == null)
            {
                throw new NullReferenceException("collection is null");
            }

            collection.AddParameter(name, value, factory);

            return(collection);
        }