System.Runtime.Remoting.SoapServices.IsNameNull C# (CSharp) Méthode

IsNameNull() private static méthode

private static IsNameNull ( String name ) : bool
name String
Résultat bool
        private static bool IsNameNull(String name)
        {
            if (name == null || name.Length == 0)
                return true;
            else
                return false;
        }
        

Usage Example

Exemple #1
0
 public static bool DecodeXmlNamespaceForClrTypeNamespace(string inNamespace, out string typeNamespace, out string assemblyName)
 {
     if (SoapServices.IsNameNull(inNamespace))
     {
         throw new ArgumentNullException("inNamespace");
     }
     assemblyName  = null;
     typeNamespace = "";
     if (inNamespace.StartsWith(SoapServices.assemblyNS, StringComparison.Ordinal))
     {
         assemblyName = SoapServices.UriDecode(inNamespace.Substring(SoapServices.assemblyNS.Length));
     }
     else if (inNamespace.StartsWith(SoapServices.namespaceNS, StringComparison.Ordinal))
     {
         typeNamespace = inNamespace.Substring(SoapServices.namespaceNS.Length);
     }
     else
     {
         if (!inNamespace.StartsWith(SoapServices.fullNS, StringComparison.Ordinal))
         {
             return(false);
         }
         int num = inNamespace.IndexOf("/", SoapServices.fullNS.Length);
         typeNamespace = inNamespace.Substring(SoapServices.fullNS.Length, num - SoapServices.fullNS.Length);
         assemblyName  = SoapServices.UriDecode(inNamespace.Substring(num + 1));
     }
     return(true);
 }
All Usage Examples Of System.Runtime.Remoting.SoapServices::IsNameNull