Beispiel #1
0
 /// <summary>Returns the common language runtime type namespace name from the provided namespace and assembly names.</summary>
 /// <returns>The common language runtime type namespace name from the provided namespace and assembly names.</returns>
 /// <param name="typeNamespace">The namespace that is to be coded. </param>
 /// <param name="assemblyName">The name of the assembly that is to be coded. </param>
 /// <exception cref="T:System.ArgumentNullException">The <paramref name="assemblyName" /> and <paramref name="typeNamespace" /> parameters are both either null or empty. </exception>
 /// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
 /// <PermissionSet>
 ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
 /// </PermissionSet>
 public static string CodeXmlNamespaceForClrTypeNamespace(string typeNamespace, string assemblyName)
 {
     if (assemblyName == string.Empty)
     {
         return(SoapServices.XmlNsForClrTypeWithNs + typeNamespace);
     }
     if (typeNamespace == string.Empty)
     {
         return(SoapServices.EncodeNs(SoapServices.XmlNsForClrTypeWithAssembly + assemblyName));
     }
     return(SoapServices.EncodeNs(SoapServices.XmlNsForClrTypeWithNsAndAssembly + typeNamespace + "/" + assemblyName));
 }