MessageHeaderArrayAttribute 類別

定義

指定不可以在標頭項目中的陣列型別周圍寫入 SOAP 訊息中的預設包裝函式項目。

public ref class MessageHeaderArrayAttribute sealed : System::ServiceModel::MessageHeaderAttribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]
public sealed class MessageHeaderArrayAttribute : System.ServiceModel.MessageHeaderAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)>]
type MessageHeaderArrayAttribute = class
    inherit MessageHeaderAttribute
Public NotInheritable Class MessageHeaderArrayAttribute
Inherits MessageHeaderAttribute
繼承
屬性

備註

當您想要直接在 MessageHeaderArrayAttribute 內,或是不使用陣列型別的預設包裝函式項目而在第一個 <soap:Header> 以及唯獨其子標頭之內,發出未限制數目的相同項目時,您可以使用 <soap:Header> 屬性 (Attribute) 來關閉標準陣列包裝函式項目。

MessageHeaderArrayAttribute 只能套用至陣列類型的成員。 如果加以指定,NameNamespace 就會當做每個陣列項目之元素的名稱和命名空間來使用。 如果未指定,則會使用進行非重複本文部分之命名所用的相同慣例來命名陣列項目元素。 如需詳細資訊,請參閱 NameNamespace

如需控制 SOAP 主體內容的序列化,而不需修改預設 SOAP 信封本身的資訊,請參閱 System.Runtime.Serialization.DataContractAttribute服務合約中指定資料傳輸和使用 資料合約

如需建立訊息合約的詳細資訊,請參閱 使用訊息合約

建構函式

MessageHeaderArrayAttribute()

初始化 MessageHeaderArrayAttribute 類別的新執行個體。

屬性

Actor

取得或設定 URI,這個 URI 表示此標頭的目標節點。 使用 SOAP 1.2 時,會對應到 role 標頭屬性,而使用 SOAP 1.1 則會對應到 actor 標頭屬性。

(繼承來源 MessageHeaderAttribute)
HasProtectionLevel

在衍生類別中覆寫時,取得指出成員是否已指派保護層級的值。

(繼承來源 MessageContractMemberAttribute)
MustUnderstand

指定扮演 Actor 角色的節點是否必須解讀這個標頭。 這會對應到 mustUnderstand SOAP 標頭屬性。

(繼承來源 MessageHeaderAttribute)
Name

指定對應於這個成員的項目名稱。

(繼承來源 MessageContractMemberAttribute)
Namespace

指定對應於這個成員的項目命名空間。

(繼承來源 MessageContractMemberAttribute)
ProtectionLevel

指定成員要依現狀加以傳輸、簽署,或者加以簽署並加密。

(繼承來源 MessageContractMemberAttribute)
Relay

指定這個標頭是否要轉送至下游節點。 這會對應到 relay SOAP 標頭屬性。

(繼承來源 MessageHeaderAttribute)
TypeId

在衍生類別中實作時,取得這個 Attribute 的唯一識別碼。

(繼承來源 Attribute)

方法

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)

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。

(繼承來源 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

擷取物件的類型資訊,可以用來取得介面的類型資訊。

(繼承來源 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

擷取物件提供的類型資訊介面數目 (0 或 1)。

(繼承來源 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供物件所公開的屬性和方法的存取權。

(繼承來源 Attribute)

適用於