コード例 #1
0
ファイル: soap.cs プロジェクト: ydunk/masters
        } // 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
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: XmlMapper.cs プロジェクト: turkmvc/EasyBankToYnab
 public Entry MapToDomain(XmlEntry xmlEntry)
 {
     return(this.Map <XmlEntry, Entry>(xmlEntry));
 }
コード例 #5
0
 public static void RegisterInteropXmlType(string xmlType, string xmlTypeNamespace, Type type)
 {
     _interopXmlTypeToType[CreateKey(xmlType, xmlTypeNamespace)] = type;
     _interopTypeToXmlType[type] = new XmlEntry(xmlType, xmlTypeNamespace);
 }
コード例 #6
0
 public static void RegisterInteropXmlElement(string xmlElement, string xmlNamespace, Type type)
 {
     _interopXmlElementToType[CreateKey(xmlElement, xmlNamespace)] = type;
     _interopTypeToXmlElement[type] = new XmlEntry(xmlElement, xmlNamespace);
 }
コード例 #7
0
 public static void RegisterInteropXmlType(string xmlType, string xmlTypeNamespace, Type type)
 {
     _interopXmlTypeToType[CreateKey(xmlType, xmlTypeNamespace)] = type;
     _interopTypeToXmlType[type] = new XmlEntry(xmlType, xmlTypeNamespace);
 }
コード例 #8
0
 public static void RegisterInteropXmlElement(string xmlElement, string xmlNamespace, Type type)
 {
     _interopXmlElementToType[CreateKey(xmlElement, xmlNamespace)] = type;
     _interopTypeToXmlElement[type] = new XmlEntry(xmlElement, xmlNamespace);
 }