public Method(string name, string type, Parameter[] parameters) : this(name, type) { foreach (Parameter parameter in parameters) { this.parameters.Add(parameter); } }
public void AddParameter(Parameter parameter) { foreach (Parameter p in this.parameters) { if (p.Name == parameter.Name) { return; } } this.parameters.Add(parameter); }
public Request(string name, Parameter[] parameters) : base(name, Const.REQUEST, parameters) { }
public Response(string name, Parameter[] parameters) : base(name, Const.REPONSE, parameters) { }
public static new Parameter Parse(XmlElement parameter) { if (parameter == null) { throw new Exception("parameter can't be null!"); } string type = string.Empty; string direction = string.Empty; if (parameter.HasAttribute("Type")) { type = parameter.GetAttribute("Type"); } else { throw new Exception("load hasn't type attribute!"); } if (parameter.HasAttribute("Direction")) { direction = parameter.GetAttribute("Direction"); } else { throw new Exception("parameter hasn't direction attribute!"); } Direction enumDirection = (Direction)Enum.Parse(typeof(Direction), direction); Parameter result = new Parameter(enumDirection, parameter.Name, type, parameter.InnerText); return result; }