System.Runtime.Remoting.MetadataServices.WsdlParser.GetTypeString C# (CSharp) Method

GetTypeString() private method

private GetTypeString ( String curNS, bool bNS, URTNamespace urtNS, String typeName, String typeNS ) : String
curNS String
bNS bool
urtNS URTNamespace
typeName String
typeNS String
return String
        internal String GetTypeString(String curNS, bool bNS, URTNamespace urtNS, String typeName, String typeNS) 
        {
            Util.Log("WsdlParser.GetTypeString Entry curNS "+curNS+" bNS "+bNS+" URTNamespace "+urtNS.Name+" typeName "+typeName+" typeNS "+typeNS);
            String type;

            URTComplexType ct = urtNS.LookupComplexType(typeName);
            if (ct != null && ct.IsArray())
            {
                if (ct.GetArray() == null)
                    ct.ResolveArray();
                String arrayName = ct.GetArray();
                URTNamespace arrayNS = ct.GetArrayNS();
                StringBuilder sb = new StringBuilder(50);
                if (arrayNS.EncodedNS != null && Qualify(urtNS.EncodedNS, arrayNS.EncodedNS))
                {
                    sb.Append(WsdlParser.IsValidCSAttr(arrayNS.EncodedNS));
                    sb.Append('.');
                }
                sb.Append(WsdlParser.IsValidCSAttr(arrayName));
                type = sb.ToString();
            }
            else
            {
                String encodedNS = null;
                if (urtNS.UrtType == UrtType.Interop)
                    encodedNS = urtNS.EncodedNS;
                else
                    encodedNS = typeNS;

                if (bNS && Qualify(encodedNS, curNS))
                {
                    StringBuilder sb = new StringBuilder(50);
                    if (encodedNS != null)
                    {
                        sb.Append(WsdlParser.IsValidCSAttr(encodedNS));
                        sb.Append('.');
                    }
                    sb.Append(WsdlParser.IsValidCSAttr(typeName));
                    type = sb.ToString();
                }
                else
                {
                    type = typeName;
                }

            }

            int index = type.IndexOf('+');
            if (index > 0)
            {
                // nested type, replace + with . Should be done earlier when forming names
                if (bNS)
                    type = type.Replace('+', '.');
                else
                    type = type.Substring(0,index);
            }


            Util.Log("WsdlParser.GetTypeString Exit type "+type);              
            return(type);
        }