Esempio n. 1
0
        public static bool GetXmlTypeForInteropType(Type type, out string xmlType, out string xmlTypeNamespace)
        {
            SoapServices.XmlEntry xmlEntry = (SoapServices.XmlEntry)SoapServices._interopTypeToXmlType[type];
            if (xmlEntry != null)
            {
                xmlType          = xmlEntry.Name;
                xmlTypeNamespace = xmlEntry.Namespace;
                return(true);
            }
            SoapTypeAttribute soapTypeAttribute = (SoapTypeAttribute)InternalRemotingServices.GetCachedSoapAttribute(type);

            if (soapTypeAttribute.IsInteropXmlType())
            {
                xmlType          = soapTypeAttribute.XmlTypeName;
                xmlTypeNamespace = soapTypeAttribute.XmlTypeNamespace;
                return(true);
            }
            xmlType          = null;
            xmlTypeNamespace = null;
            return(false);
        }