} // GetXmlElementForInteropType /// <include file='doc\Soap.uex' path='docs/doc[@for="SoapServices.GetXmlTypeForInteropType"]/*' /> public static bool GetXmlTypeForInteropType(Type type, out String xmlType, out String xmlTypeNamespace) { // check table first XmlEntry entry = (XmlEntry)_interopTypeToXmlType[type]; if (entry != null) { xmlType = entry.Name; xmlTypeNamespace = entry.Namespace; return(true); } // check soap attribute SoapTypeAttribute attr = (SoapTypeAttribute) InternalRemotingServices.GetCachedSoapAttribute(type); if (attr.IsInteropXmlType()) { xmlType = attr.XmlTypeName; xmlTypeNamespace = attr.XmlTypeNamespace; return(true); } else { xmlType = null; xmlTypeNamespace = null; return(false); } } // GetXmlTypeForInteropType
void createStructuredXmlGroupedByEntrys(XElement productElement, XmlEntry entry, XElement selectionElement) { try { var xElementNode = XPathSelectElements(productElement, entry.@from); foreach (var nameObject in xElementNode) { XElement entryElement = new XElement(SetProperName(nameObject, entry.to)); entryElement.Add(nameObject.Value); if (selectionWithNoDuplicateEntry(selectionElement, entryElement.Name.ToString())) { selectionElement.Add(entryElement); } } } catch (Exception ex) { Console.WriteLine("Error: " + ex); } }
public static bool GetXmlTypeForInteropType(Type type, out string xmlType, out string xmlTypeNamespace) { XmlEntry entry = (XmlEntry)_interopTypeToXmlType[type]; if (entry != null) { xmlType = entry.Name; xmlTypeNamespace = entry.Namespace; return(true); } SoapTypeAttribute cachedSoapAttribute = (SoapTypeAttribute)InternalRemotingServices.GetCachedSoapAttribute(type); if (cachedSoapAttribute.IsInteropXmlType()) { xmlType = cachedSoapAttribute.XmlTypeName; xmlTypeNamespace = cachedSoapAttribute.XmlTypeNamespace; return(true); } xmlType = null; xmlTypeNamespace = null; return(false); }
public Entry MapToDomain(XmlEntry xmlEntry) { return(this.Map <XmlEntry, Entry>(xmlEntry)); }
public static void RegisterInteropXmlType(string xmlType, string xmlTypeNamespace, Type type) { _interopXmlTypeToType[CreateKey(xmlType, xmlTypeNamespace)] = type; _interopTypeToXmlType[type] = new XmlEntry(xmlType, xmlTypeNamespace); }
public static void RegisterInteropXmlElement(string xmlElement, string xmlNamespace, Type type) { _interopXmlElementToType[CreateKey(xmlElement, xmlNamespace)] = type; _interopTypeToXmlElement[type] = new XmlEntry(xmlElement, xmlNamespace); }