Esempio n. 1
0
        public static string CodeXmlNamespaceForClrTypeNamespace(
            string typeNamespace,
            string assemblyName)
        {
            StringBuilder sb = new StringBuilder(256);

            if (SoapServices.IsNameNull(typeNamespace))
            {
                if (SoapServices.IsNameNull(assemblyName))
                {
                    throw new ArgumentNullException("typeNamespace,assemblyName");
                }
                sb.Append(SoapServices.assemblyNS);
                SoapServices.UriEncode(assemblyName, sb);
            }
            else if (SoapServices.IsNameNull(assemblyName))
            {
                sb.Append(SoapServices.namespaceNS);
                sb.Append(typeNamespace);
            }
            else
            {
                sb.Append(SoapServices.fullNS);
                if (typeNamespace[0] == '.')
                {
                    sb.Append(typeNamespace.Substring(1));
                }
                else
                {
                    sb.Append(typeNamespace);
                }
                sb.Append('/');
                SoapServices.UriEncode(assemblyName, sb);
            }
            return(sb.ToString());
        }
Esempio n. 2
0
 public void GetFieldTypeAndNameFromXmlAttribute(
     string xmlAttribute,
     string xmlNamespace,
     out Type type,
     out string name)
 {
     SoapServices.XmlToFieldTypeMap.FieldEntry attribute = (SoapServices.XmlToFieldTypeMap.FieldEntry) this._attributes[(object)SoapServices.CreateKey(xmlAttribute, xmlNamespace)];
     if (attribute != null)
     {
         type = attribute.Type;
         name = attribute.Name;
     }
     else
     {
         type = (Type)null;
         name = (string)null;
     }
 }
Esempio n. 3
0
 public void GetFieldTypeAndNameFromXmlElement(
     string xmlElement,
     string xmlNamespace,
     out Type type,
     out string name)
 {
     SoapServices.XmlToFieldTypeMap.FieldEntry element = (SoapServices.XmlToFieldTypeMap.FieldEntry) this._elements[(object)SoapServices.CreateKey(xmlElement, xmlNamespace)];
     if (element != null)
     {
         type = element.Type;
         name = element.Name;
     }
     else
     {
         type = (Type)null;
         name = (string)null;
     }
 }
Esempio n. 4
0
 public static void RegisterInteropXmlType(string xmlType, string xmlTypeNamespace, Type type)
 {
     SoapServices._interopXmlTypeToType[(object)SoapServices.CreateKey(xmlType, xmlTypeNamespace)] = (object)type;
     SoapServices._interopTypeToXmlType[(object)type] = (object)new SoapServices.XmlEntry(xmlType, xmlTypeNamespace);
 }
Esempio n. 5
0
 public static Type GetInteropTypeFromXmlType(string xmlType, string xmlTypeNamespace) => (Type)SoapServices._interopXmlTypeToType[(object)SoapServices.CreateKey(xmlType, xmlTypeNamespace)];
Esempio n. 6
0
 public static Type GetInteropTypeFromXmlElement(string xmlElement, string xmlNamespace) => (Type)SoapServices._interopXmlElementToType[(object)SoapServices.CreateKey(xmlElement, xmlNamespace)];