SoapTypeAttribute クラス

定義

対象の型の SOAP 生成および 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 のカスタマイズを SoapTypeAttribute示します。 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)

適用対象