System.Runtime.Remoting.XmlNamespaceEncoder.GetXmlNamespaceForTypeNamespace C# (CSharp) Method

GetXmlNamespaceForTypeNamespace() static private method

static private GetXmlNamespaceForTypeNamespace ( Type type, String dynamicUrl ) : String
type System.Type
dynamicUrl String
return String
        internal static String GetXmlNamespaceForTypeNamespace(Type type, String dynamicUrl)
        {        
            String typeNamespace = type.Namespace;
            Assembly assem = type.Module.Assembly;
            StringBuilder sb = new StringBuilder(256);
            Assembly systemAssembly = typeof(String).Module.Assembly;

            if(assem == systemAssembly)
            {
                sb.Append(SoapServices.namespaceNS);
                sb.Append(typeNamespace);
            }
            else
            {
                sb.Append(SoapServices.fullNS);
                sb.Append(typeNamespace);
                sb.Append('/');
                sb.Append(assem.nGetSimpleName());
            }

            return sb.ToString();
        } // GetXmlNamespaceForTypeNamespace