SoapTypeAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ターゲット型の SOAP の生成と処理をカスタマイズします。 このクラスは継承できません。
public ref class SoapTypeAttribute sealed : System::Runtime::Remoting::Metadata::SoapAttribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct)]
public sealed class SoapTypeAttribute : System.Runtime.Remoting.Metadata.SoapAttribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapTypeAttribute : System.Runtime.Remoting.Metadata.SoapAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct)>]
type SoapTypeAttribute = class
inherit SoapAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapTypeAttribute = class
inherit SoapAttribute
Public NotInheritable Class SoapTypeAttribute
Inherits SoapAttribute
- 継承
- 属性
例
次のコード例は、 SoapTypeAttributeを持つクラスに対して生成される SOAP のカスタマイズを示しています。 SOAP は、 SerializableAttribute クラスの例に示されているコードによって生成できます。
[Serializable]
[SoapTypeAttribute(XmlNamespace="MyXmlNamespace")]
public ref class TestSimpleObject
{
public:
int member1;
[SoapFieldAttribute(XmlElementName="MyXmlElement")] String^ member2;
String^ member3;
double member4;
// A field that is not serialized.
[NonSerialized] String^ member5;
TestSimpleObject()
{
member1 = 11;
member2 = "hello";
member3 = "hello";
member4 = 3.14159265;
member5 = "hello world!";
}
};
[Serializable()]
[SoapTypeAttribute(XmlNamespace="MyXmlNamespace")]
public class TestSimpleObject {
public int member1;
[SoapFieldAttribute(XmlElementName="MyXmlElement")] public string member2;
public string member3;
public double member4;
// A field that is not serialized.
[NonSerialized()] public string member5;
public TestSimpleObject() {
member1 = 11;
member2 = "hello";
member3 = "hello";
member4 = 3.14159265;
member5 = "hello world!";
}
}
<Serializable(), SoapTypeAttribute(XmlNamespace := "MyXmlNamespace")> Public Class TestSimpleObject
Public member1 As Integer
<SoapFieldAttribute(XmlElementName := "MyXmlElement")> Public member2 As String
Public member3 As String
Public member4 As Double
' A field that is not serialized.
<NonSerialized()> Public member5 As String
Public Sub New()
member1 = 11
member2 = "hello"
member3 = "hello"
member4 = 3.14159265
member5 = "hello world!"
End Sub
End Class
注釈
SoapTypeAttribute属性は、オブジェクト、値型、およびインターフェイス オブジェクトに適用できるカスタム属性です。 この属性は、SOAP による SOAP XML ワイヤ形式の生成方法を制御するオブジェクト型に関する情報を指定するために使用されます。
コンストラクター
| 名前 | 説明 |
|---|---|
| SoapTypeAttribute() |
SoapTypeAttribute のインスタンスを作成します。 |
フィールド
| 名前 | 説明 |
|---|---|
| ProtXmlNamespace |
現在の SOAP 属性のターゲットがシリアル化される XML 名前空間。 (継承元 SoapAttribute) |
| ReflectInfo |
XML シリアル化情報を設定するために SoapAttribute クラスから派生した属性クラスによって使用されるリフレクション オブジェクト。 (継承元 SoapAttribute) |
プロパティ
| 名前 | 説明 |
|---|---|
| Embedded |
SOAP シリアル化中に型を入れ子にする必要があるかどうかを示す値を取得または設定します。 (継承元 SoapAttribute) |
| SoapOptions |
SoapOption構成値を取得または設定します。 |
| TypeId |
派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。 (継承元 Attribute) |
| UseAttribute |
現在の属性のターゲットを XML フィールドではなく XML 属性としてシリアル化するかどうかを示す値を取得または設定します。 |
| XmlElementName |
XML 要素名を取得または設定します。 |
| XmlFieldOrder |
ターゲット オブジェクト型の XML フィールドの順序を取得または設定します。 |
| XmlNamespace |
ターゲット オブジェクト型のシリアル化中に使用される XML 名前空間を取得または設定します。 |
| XmlTypeName |
ターゲット オブジェクト型の XML 型名を取得または設定します。 |
| XmlTypeNamespace |
現在のオブジェクト型の XML 型名前空間を取得または設定します。 |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 (継承元 Attribute) |
| GetHashCode() |
このインスタンスのハッシュ コードを返します。 (継承元 Attribute) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| IsDefaultAttribute() |
派生クラスでオーバーライドされた場合、このインスタンスの値が派生クラスの既定値であるかどうかを示します。 (継承元 Attribute) |
| Match(Object) |
派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 (継承元 Attribute) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |
明示的なインターフェイスの実装
| 名前 | 説明 |
|---|---|
| _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) |
一連の名前を対応する一連のディスパッチ識別子に割り当てます。 (継承元 Attribute) |
| _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) |
インターフェイスの型情報を取得するために使用できるオブジェクトの型情報を取得します。 (継承元 Attribute) |
| _Attribute.GetTypeInfoCount(UInt32) |
オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。 (継承元 Attribute) |
| _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) |
オブジェクトによって公開されるプロパティとメソッドへのアクセスを提供します。 (継承元 Attribute) |