Exemplo n.º 1
0
 public object Clone()
 {
     Parameter parameters = new Parameter();
     parameters.Name = Name != null ? (string)Name.Clone() : null;
     parameters.ParamValue = ParamValue != null ? (string)ParamValue.Clone() : null;
     return parameters;
 }
Exemplo n.º 2
0
     private static Hashtable GetParameters(Parameter[] parameters)
        {
            if (parameters == null)
                return null;

            Hashtable settings = new Hashtable();
            for (int i = 0; i < parameters.Length; i++)
                settings[parameters[i].Name] = parameters[i].ParamValue;


            return settings;
        }
Exemplo n.º 3
0
            private static Parameter[] GetParameters(Hashtable settings)
            {
                if (settings == null) return null;
                Parameter[] parameters = new Parameter[settings.Count];

                int i = 0;
                IDictionaryEnumerator ide = settings.GetEnumerator();
                while (ide.MoveNext())
                {
                    Parameter parameter = new Parameter();
                    parameter.Name = ide.Key as string;
                    parameter.ParamValue = ide.Value as string;
                    parameters[i] = parameter;
                    i++;
                }
                return parameters;
            }