private void AddParameter(SoapParameter parameter)
 {
     this.parameters.Add(parameter);
     if (parameter.mapping.CheckSpecified)
     {
         this.checkSpecifiedCount++;
     }
     if (parameter.IsByRef)
     {
         this.inParameters.Add(parameter);
         this.outParameters.Add(parameter);
         if (parameter.mapping.CheckSpecified)
         {
             this.inCheckSpecifiedCount++;
             this.outCheckSpecifiedCount++;
         }
     }
     else if (parameter.IsOut)
     {
         this.outParameters.Add(parameter);
         if (parameter.mapping.CheckSpecified)
         {
             this.outCheckSpecifiedCount++;
         }
     }
     else
     {
         this.inParameters.Add(parameter);
         if (parameter.mapping.CheckSpecified)
         {
             this.inCheckSpecifiedCount++;
         }
     }
 }
        internal SoapParameters(XmlMembersMapping request, XmlMembersMapping response, string[] parameterOrder, CodeIdentifiers identifiers) {
            ArrayList requestList = new ArrayList();
            ArrayList responseList = new ArrayList();

            AddMappings(requestList, request);
            if (response != null) AddMappings(responseList, response);

            if (parameterOrder != null) {
                for (int i = 0; i < parameterOrder.Length; i++) {
                    string elementName = parameterOrder[i];
                    XmlMemberMapping requestMapping = FindMapping(requestList, elementName);
                    SoapParameter parameter = new SoapParameter();
                    if (requestMapping != null) {
                        if (RemoveByRefMapping(responseList, requestMapping))
                            parameter.codeFlags = CodeFlags.IsByRef;
                        parameter.mapping = requestMapping;
                        requestList.Remove(requestMapping);
                        AddParameter(parameter);
                    }
                    else {
                        XmlMemberMapping responseMapping = FindMapping(responseList, elementName);
                        if (responseMapping != null) {
                            parameter.codeFlags = CodeFlags.IsOut;
                            parameter.mapping = responseMapping;
                            responseList.Remove(responseMapping);
                            AddParameter(parameter);
                        }
                    }
                }
            }

            foreach (XmlMemberMapping requestMapping in requestList) {
                SoapParameter parameter = new SoapParameter();
                if (RemoveByRefMapping(responseList, requestMapping))
                    parameter.codeFlags = CodeFlags.IsByRef;
                parameter.mapping = requestMapping;
                AddParameter(parameter);
            }

            if (responseList.Count > 0) {
                if (!((XmlMemberMapping) responseList[0]).CheckSpecified) {
                    ret = (XmlMemberMapping)responseList[0];
                    responseList.RemoveAt(0);
                }
                foreach (XmlMemberMapping responseMapping in responseList) {
                    SoapParameter parameter = new SoapParameter();
                    parameter.mapping = responseMapping;
                    parameter.codeFlags = CodeFlags.IsOut;
                    AddParameter(parameter);
                }
            }

            foreach (SoapParameter parameter in parameters) {
                parameter.name = identifiers.MakeUnique(CodeIdentifier.MakeValid(parameter.mapping.MemberName));
            }
        }
 private void AddParameter(SoapParameter parameter)
 {
     this.parameters.Add(parameter);
     if (parameter.mapping.CheckSpecified)
     {
         this.checkSpecifiedCount++;
     }
     if (parameter.IsByRef)
     {
         this.inParameters.Add(parameter);
         this.outParameters.Add(parameter);
         if (parameter.mapping.CheckSpecified)
         {
             this.inCheckSpecifiedCount++;
             this.outCheckSpecifiedCount++;
         }
     }
     else if (parameter.IsOut)
     {
         this.outParameters.Add(parameter);
         if (parameter.mapping.CheckSpecified)
         {
             this.outCheckSpecifiedCount++;
         }
     }
     else
     {
         this.inParameters.Add(parameter);
         if (parameter.mapping.CheckSpecified)
         {
             this.inCheckSpecifiedCount++;
         }
     }
 }
 internal SoapParameters(XmlMembersMapping request, XmlMembersMapping response, string[] parameterOrder, CodeIdentifiers identifiers)
 {
     ArrayList mappingsList = new ArrayList();
     ArrayList list2 = new ArrayList();
     AddMappings(mappingsList, request);
     if (response != null)
     {
         AddMappings(list2, response);
     }
     if (parameterOrder != null)
     {
         for (int i = 0; i < parameterOrder.Length; i++)
         {
             string elementName = parameterOrder[i];
             XmlMemberMapping requestMapping = FindMapping(mappingsList, elementName);
             SoapParameter parameter = new SoapParameter();
             if (requestMapping != null)
             {
                 if (RemoveByRefMapping(list2, requestMapping))
                 {
                     parameter.codeFlags = CodeFlags.IsByRef;
                 }
                 parameter.mapping = requestMapping;
                 mappingsList.Remove(requestMapping);
                 this.AddParameter(parameter);
             }
             else
             {
                 XmlMemberMapping mapping2 = FindMapping(list2, elementName);
                 if (mapping2 != null)
                 {
                     parameter.codeFlags = CodeFlags.IsOut;
                     parameter.mapping = mapping2;
                     list2.Remove(mapping2);
                     this.AddParameter(parameter);
                 }
             }
         }
     }
     foreach (XmlMemberMapping mapping3 in mappingsList)
     {
         SoapParameter parameter2 = new SoapParameter();
         if (RemoveByRefMapping(list2, mapping3))
         {
             parameter2.codeFlags = CodeFlags.IsByRef;
         }
         parameter2.mapping = mapping3;
         this.AddParameter(parameter2);
     }
     if (list2.Count > 0)
     {
         if (!((XmlMemberMapping) list2[0]).CheckSpecified)
         {
             this.ret = (XmlMemberMapping) list2[0];
             list2.RemoveAt(0);
         }
         foreach (XmlMemberMapping mapping4 in list2)
         {
             SoapParameter parameter3 = new SoapParameter {
                 mapping = mapping4,
                 codeFlags = CodeFlags.IsOut
             };
             this.AddParameter(parameter3);
         }
     }
     foreach (SoapParameter parameter4 in this.parameters)
     {
         parameter4.name = identifiers.MakeUnique(CodeIdentifier.MakeValid(parameter4.mapping.MemberName));
     }
 }
        internal SoapParameters(XmlMembersMapping request, XmlMembersMapping response, string[] parameterOrder, CodeIdentifiers identifiers)
        {
            ArrayList mappingsList = new ArrayList();
            ArrayList list2        = new ArrayList();

            AddMappings(mappingsList, request);
            if (response != null)
            {
                AddMappings(list2, response);
            }
            if (parameterOrder != null)
            {
                for (int i = 0; i < parameterOrder.Length; i++)
                {
                    string           elementName    = parameterOrder[i];
                    XmlMemberMapping requestMapping = FindMapping(mappingsList, elementName);
                    SoapParameter    parameter      = new SoapParameter();
                    if (requestMapping != null)
                    {
                        if (RemoveByRefMapping(list2, requestMapping))
                        {
                            parameter.codeFlags = CodeFlags.IsByRef;
                        }
                        parameter.mapping = requestMapping;
                        mappingsList.Remove(requestMapping);
                        this.AddParameter(parameter);
                    }
                    else
                    {
                        XmlMemberMapping mapping2 = FindMapping(list2, elementName);
                        if (mapping2 != null)
                        {
                            parameter.codeFlags = CodeFlags.IsOut;
                            parameter.mapping   = mapping2;
                            list2.Remove(mapping2);
                            this.AddParameter(parameter);
                        }
                    }
                }
            }
            foreach (XmlMemberMapping mapping3 in mappingsList)
            {
                SoapParameter parameter2 = new SoapParameter();
                if (RemoveByRefMapping(list2, mapping3))
                {
                    parameter2.codeFlags = CodeFlags.IsByRef;
                }
                parameter2.mapping = mapping3;
                this.AddParameter(parameter2);
            }
            if (list2.Count > 0)
            {
                if (!((XmlMemberMapping)list2[0]).CheckSpecified)
                {
                    this.ret = (XmlMemberMapping)list2[0];
                    list2.RemoveAt(0);
                }
                foreach (XmlMemberMapping mapping4 in list2)
                {
                    SoapParameter parameter3 = new SoapParameter {
                        mapping   = mapping4,
                        codeFlags = CodeFlags.IsOut
                    };
                    this.AddParameter(parameter3);
                }
            }
            foreach (SoapParameter parameter4 in this.parameters)
            {
                parameter4.name = identifiers.MakeUnique(CodeIdentifier.MakeValid(parameter4.mapping.MemberName));
            }
        }
 void AddParameter(SoapParameter parameter) {
     parameters.Add(parameter);
     if (parameter.mapping.CheckSpecified) {
         checkSpecifiedCount++;
     }
     if (parameter.IsByRef) {
         inParameters.Add(parameter);
         outParameters.Add(parameter);
         if (parameter.mapping.CheckSpecified) {
             inCheckSpecifiedCount++;
             outCheckSpecifiedCount++;
         }
     } else if (parameter.IsOut) {
         outParameters.Add(parameter);
         if (parameter.mapping.CheckSpecified)
             outCheckSpecifiedCount++;
     }
     else {
         inParameters.Add(parameter);
         if (parameter.mapping.CheckSpecified)
             inCheckSpecifiedCount++;
     }
 }