private void BuildCommand(IConfigurationElement parametersSection, ParameterCollection parameters) { parameters.Clear(); foreach (IConfigurationElement parameterElement in parametersSection.Elements.Values) { Parameter commandParameter = new Parameter(); foreach (IConfigurationElement propertyElement in parameterElement.Elements.Values) { ReflectionServices.SetValue(commandParameter, propertyElement.GetAttributeReference("name").Value.ToString(), propertyElement.GetAttributeReference("value").Value); } parameters.Add(commandParameter); } }
private void SetParameters(ParameterCollection original, ParameterCollection newParams) { original.Clear(); foreach (Parameter parameter in newParams) { original.Add(parameter); } }
private static void MoveParameters(ParameterCollection source, ParameterCollection target) { foreach (Parameter p in source) { target.Add(p); } source.Clear(); }
internal static void MergeParameters(ParameterCollection parameters, MethodInfo methodInfo, System.Type dataObjectType) { Parameter[] parameterArray = new Parameter[parameters.Count]; parameters.CopyTo(parameterArray, 0); parameters.Clear(); if ((methodInfo != null) && (dataObjectType == null)) { foreach (ParameterInfo info in methodInfo.GetParameters()) { Parameter parameter = CreateMergedParameter(info, parameterArray); if (parameters[parameter.Name] == null) { parameters.Add(parameter); } } } }