GetFieldTypeAndNameFromXmlElement() public method

public GetFieldTypeAndNameFromXmlElement ( String xmlElement, String xmlNamespace, Type &type, String &name ) : void
xmlElement String
xmlNamespace String
type System.Type
name String
return void
示例#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>
 // Token: 0x0600558E RID: 21902 RVA: 0x0012EDA8 File Offset: 0x0012CFA8
 public static void GetInteropFieldTypeAndNameFromXmlElement(Type containingType, string xmlElement, string xmlNamespace, out Type type, out string name)
 {
     if (containingType == null)
     {
         type = null;
         name = null;
         return;
     }
     SoapServices.XmlToFieldTypeMap xmlToFieldTypeMap = (SoapServices.XmlToFieldTypeMap)SoapServices._xmlToFieldTypeMap[containingType];
     if (xmlToFieldTypeMap != null)
     {
         xmlToFieldTypeMap.GetFieldTypeAndNameFromXmlElement(xmlElement, xmlNamespace, out type, out name);
         return;
     }
     type = null;
     name = null;
 }
示例#2
0
 /// <summary>检索提供的 XML 元素名、命名空间和包含类型中的某字段的 <see cref="T:System.Type" /> 和名称。</summary>
 /// <param name="containingType">包含该字段的对象的 <see cref="T:System.Type" />。</param>
 /// <param name="xmlElement">字段的 XML 元素名。</param>
 /// <param name="xmlNamespace">该字段类型的 XML 命名空间。</param>
 /// <param name="type">此方法返回时,包含该字段的 <see cref="T:System.Type" />。该参数未经初始化即被传递。</param>
 /// <param name="name">此方法返回时,包含保存该字段名的 <see cref="T:System.String" />。该参数未经初始化即被传递。</param>
 /// <exception cref="T:System.Security.SecurityException">直接调用方没有基础结构权限。</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)
 {
     if (containingType == (Type)null)
     {
         type = (Type)null;
         name = (string)null;
     }
     else
     {
         SoapServices.XmlToFieldTypeMap xmlToFieldTypeMap = (SoapServices.XmlToFieldTypeMap)SoapServices._xmlToFieldTypeMap[(object)containingType];
         if (xmlToFieldTypeMap != null)
         {
             xmlToFieldTypeMap.GetFieldTypeAndNameFromXmlElement(xmlElement, xmlNamespace, out type, out name);
         }
         else
         {
             type = (Type)null;
             name = (string)null;
         }
     }
 }