SoapServices.GetInteropFieldTypeAndNameFromXmlAttribute メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Public Shared Sub GetInteropFieldTypeAndNameFromXmlAttribute ( _ containingType As Type, _ xmlAttribute As String, _ xmlNamespace As String, _ <OutAttribute> ByRef type As Type, _ <OutAttribute> ByRef name As String _ )
Dim containingType As Type Dim xmlAttribute As String Dim xmlNamespace As String Dim type As Type Dim name As String SoapServices.GetInteropFieldTypeAndNameFromXmlAttribute(containingType, xmlAttribute, xmlNamespace, type, name)
public static void GetInteropFieldTypeAndNameFromXmlAttribute ( Type containingType, string xmlAttribute, string xmlNamespace, out Type type, out string name )
public: static void GetInteropFieldTypeAndNameFromXmlAttribute ( Type^ containingType, String^ xmlAttribute, String^ xmlNamespace, [OutAttribute] Type^% type, [OutAttribute] String^% name )
public static void GetInteropFieldTypeAndNameFromXmlAttribute ( Type containingType, String xmlAttribute, String xmlNamespace, /** @attribute OutAttribute() */ /** @ref */ Type type, /** @attribute OutAttribute() */ /** @ref */ String name )


.NET Framework によって読み取られる格納オブジェクトの型、XML 属性、および XML 名前空間を指定すると、現在のメソッドは実際の共通言語ランタイムのフィールド名とフィールドの種類を返します。その後、.NET Framework はこの情報を使用して、XML ストリームから読み取ったデータをこのフィールドに設定します。

このメソッドを使用する方法を次のコード例に示します。このコード例は、SoapServices クラスのトピックで取り上げているコード例の一部分です。
// Get the name and the type of the field using its XML // element name and its XML namespace. For this query to work, // the containing type must be preloaded, and the XML element // name and the XML namespace must be explicitly declared on // the field using a SoapFieldAttribute. // Preload the containing type. SoapServices.PreLoad(typeof(ExampleNamespace.ExampleClass)); // Get the name and the type of a field that will be // serialized as an XML element. Type containingType = typeof(ExampleNamespace.ExampleClass); string xmlElementNamespace = "http://example.org/ExampleFieldNamespace"; string xmlElementName = "ExampleFieldElementName"; Type fieldType; string fieldName; SoapServices.GetInteropFieldTypeAndNameFromXmlElement( containingType, xmlElementName, xmlElementNamespace, out fieldType, out fieldName); Console.WriteLine( "The type of the field is {0}.", fieldType); Console.WriteLine( "The name of the field is {0}.", fieldName); // Get the name and the type of a field that will be // serialized as an XML attribute. string xmlAttributeNamespace = "http://example.org/ExampleAttributeNamespace"; string xmlAttributeName = "ExampleFieldAttributeName"; SoapServices.GetInteropFieldTypeAndNameFromXmlAttribute( containingType, xmlAttributeName, xmlAttributeNamespace, out fieldType, out fieldName); Console.WriteLine( "The type of the field is {0}.", fieldType); Console.WriteLine( "The name of the field is {0}.", fieldName);
// Get the name and the type of the field using its XML // element name and its XML namespace. For this query to work, // the containing type must be preloaded, and the XML element // name and the XML namespace must be explicitly declared on // the field using a SoapFieldAttribute. // Preload the containing type. SoapServices::PreLoad( ExampleNamespace::ExampleClass::typeid ); // Get the name and the type of a field that will be // serialized as an XML element. Type^ containingType = ExampleNamespace::ExampleClass::typeid; String^ xmlElementNamespace = L"http://example.org/ExampleFieldNamespace"; String^ xmlElementName = L"ExampleFieldElementName"; Type^ fieldType; String^ fieldName; SoapServices::GetInteropFieldTypeAndNameFromXmlElement( containingType,xmlElementName,xmlElementNamespace,fieldType,fieldName ); Console::WriteLine( L"The type of the field is {0}.", fieldType ); Console::WriteLine( L"The name of the field is {0}.", fieldName ); // Get the name and the type of a field that will be // serialized as an XML attribute. String^ xmlAttributeNamespace = L"http://example.org/ExampleAttributeNamespace"; String^ xmlAttributeName = L"ExampleFieldAttributeName"; SoapServices::GetInteropFieldTypeAndNameFromXmlAttribute( containingType,xmlAttributeName,xmlAttributeNamespace,fieldType,fieldName ); Console::WriteLine( L"The type of the field is {0}.", fieldType ); Console::WriteLine( L"The name of the field is {0}.", fieldName );
// Get the name and the type of the field using its XML // element name and its XML namespace. For this query to work, // the containing type must be preloaded, and the XML element // name and the XML namespace must be explicitly declared on // the field using a SoapFieldAttribute. // Preload the containing type. SoapServices.PreLoad(ExampleNamespace.ExampleClass.class.ToType()); // Get the name and the type of a field that will be // serialized as an XML element. Type containingType = ExampleNamespace.ExampleClass.class.ToType(); String xmlElementNamespace = "http://example.org/ExampleFieldNamespace"; String xmlElementName = "ExampleFieldElementName"; Type fieldType = null; String fieldName = ""; SoapServices.GetInteropFieldTypeAndNameFromXmlElement(containingType, xmlElementName, xmlElementNamespace, fieldType, fieldName); Console.WriteLine("The type of the field is {0}.", fieldType); Console.WriteLine("The name of the field is {0}.", fieldName); // Get the name and the type of a field that will be // serialized as an XML attribute. String xmlAttributeNamespace = "http://example.org/ExampleAttributeNamespace"; String xmlAttributeName = "ExampleFieldAttributeName"; SoapServices.GetInteropFieldTypeAndNameFromXmlAttribute(containingType, xmlAttributeName, xmlAttributeNamespace, fieldType, fieldName); Console.WriteLine("The type of the field is {0}.", fieldType); Console.WriteLine("The name of the field is {0}.", fieldName);


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からSoapServices.GetInteropFieldTypeAndNameFromXmlAttribute メソッドを検索する場合は、下記のリンクをクリックしてください。

- SoapServices.GetInteropFieldTypeAndNameFromXmlAttribute メソッドのページへのリンク