Exemple #1
0
 public void AddParameterIf(bool condition, string name, object value, ParameterConfiguration factory = null)
 {
     if (condition)
     {
         AddParameter(name, value, factory);
     }
 }
 public static InputCollection Add(this InputCollection collection, string name, Guid?value, ParameterConfiguration <Guid?> factory = null)
 {
     return(Add(collection, name, (object)value, factory ?? new NullableParameterConfiguration <Guid>()));
 }
 public static InputCollection Add(this InputCollection collection, string name, float value, ParameterConfiguration <float> factory = null)
 {
     return(Add(collection, name, (object)value, factory));
 }
        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);
        }
 public static InputCollection Add <T>(this InputCollection collection, string name, T value, ParameterConfiguration <T> factory)
 {
     return(Add(collection, name, (object)value, factory));
 }
Exemple #6
0
 public void AddParameter(string name, object value, ParameterConfiguration factory = null)
 {
     _items.Add(new InputParameter(name, value, factory));
 }