Пример #1
0
        /// <summary>Retrieves the <see cref="T:System.Type" /> and name of a field from the provided XML element name, namespace, and the containing type.</summary>
        /// <param name="containingType">The <see cref="T:System.Type" /> of the object that contains the field. </param>
        /// <param name="xmlElement">The XML element name of field. </param>
        /// <param name="xmlNamespace">The XML namespace of the field type. </param>
        /// <param name="type">When this method returns, contains a <see cref="T:System.Type" /> of the field. This parameter is passed uninitialized. </param>
        /// <param name="name">When this method returns, contains a <see cref="T:System.String" /> that holds the name of the field. This parameter is passed uninitialized. </param>
        /// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
        /// <PermissionSet>
        ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
        /// </PermissionSet>
        public static void GetInteropFieldTypeAndNameFromXmlElement(Type containingType, string xmlElement, string xmlNamespace, out Type type, out string name)
        {
            SoapServices.TypeInfo typeInfo = (SoapServices.TypeInfo)SoapServices._typeInfos[containingType];
            Hashtable             fields   = (typeInfo == null) ? null : typeInfo.Elements;

            SoapServices.GetInteropFieldInfo(fields, xmlElement, xmlNamespace, out type, out name);
        }