MessageHeaderArrayAttribute 類別

定義

指定不可以在標頭項目中的陣列型別周圍寫入 SOAP 訊息中的預設包裝函式項目。Specifies that the default wrapper element in the SOAP message must not be written around array types in a header element.

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

備註

當您想要直接在 MessageHeaderArrayAttribute 內,或是不使用陣列型別的預設包裝函式項目而在第一個 <soap:Header> 以及唯獨其子標頭之內,發出未限制數目的相同項目時,您可以使用 <soap:Header> 屬性 (Attribute) 來關閉標準陣列包裝函式項目。Use the MessageHeaderArrayAttribute attribute to turn off the standard array wrapper element when you want to emit an unbounded number of identical elements either inside the <soap:Header> directly or inside the first and only child of <soap:Header> without the default wrapper element for array types.

MessageHeaderArrayAttribute 只能套用至陣列類型的成員。MessageHeaderArrayAttribute can be applied only to members of an array type. 如果加以指定,NameNamespace 就會當做每個陣列項目之元素的名稱和命名空間來使用。If specified, the Name and Namespace are used as the name and namespace of the element of each array item. 如果未指定,則會使用進行非重複本文部分之命名所用的相同慣例來命名陣列項目元素。If not specified, the array item elements are named using the same convention used for naming non-repeating body parts. 如需詳細資訊,請參閱 NameNamespaceFor more information, see Name and Namespace.

如需如何控制 SOAP 本文內容的序列化,而不修改預設 SOAP 封套本身的詳細資訊,請參閱 System.Runtime.Serialization.DataContractAttribute指定服務合約中的資料傳輸,以及 使用資料合約For information about controlling the serialization of the contents of a SOAP body without modifying the default SOAP envelope itself, see System.Runtime.Serialization.DataContractAttribute, Specifying Data Transfer in Service Contracts, and Using Data Contracts.

如需建立訊息合約的詳細資訊,請參閱 使用訊息合約For more information about creating message contracts, see Using Message Contracts.

建構函式

MessageHeaderArrayAttribute()

初始化 MessageHeaderArrayAttribute 類別的新執行個體。Initializes a new instance of the MessageHeaderArrayAttribute class.

屬性

Actor

取得或設定 URI,這個 URI 表示此標頭的目標節點。Gets or sets a URI that indicates the node at which this header is targeted. 使用 SOAP 1.2 時,會對應到 role 標頭屬性,而使用 SOAP 1.1 則會對應到 actor 標頭屬性。Maps to the role header attribute when SOAP 1.2 is used and the actor header attribute when SOAP 1.1 is used.

(繼承來源 MessageHeaderAttribute)
HasProtectionLevel

在衍生類別中覆寫時,取得指出成員是否已指派保護層級的值。When overridden in a derived class, gets a value that indicates whether the member has a protection level assigned.

(繼承來源 MessageContractMemberAttribute)
MustUnderstand

指定扮演 Actor 角色的節點是否必須解讀這個標頭。Specifies whether the node acting in the Actor role must understand this header. 這會對應到 mustUnderstand SOAP 標頭屬性。This is mapped to the mustUnderstand SOAP header attribute.

(繼承來源 MessageHeaderAttribute)
Name

指定對應於這個成員的項目名稱。Specifies the name of the element that corresponds to this member.

(繼承來源 MessageContractMemberAttribute)
Namespace

指定對應於這個成員的項目命名空間。Specifies the namespace of the element that corresponds to this member.

(繼承來源 MessageContractMemberAttribute)
ProtectionLevel

指定成員要依現狀加以傳輸、簽署,或者加以簽署並加密。Specifies whether the member is to be transmitted as-is, signed, or signed and encrypted.

(繼承來源 MessageContractMemberAttribute)
Relay

指定這個標頭是否要轉送至下游節點。Specifies whether this header is to be relayed to downstream nodes. 這會對應到 relay SOAP 標頭屬性。This is mapped to the relay SOAP header attribute.

(繼承來源 MessageHeaderAttribute)
TypeId

在衍生類別中實作時,取得這個 Attribute 的唯一識別碼。When implemented in a derived class, gets a unique identifier for this Attribute.

(繼承來源 Attribute)

方法

Equals(Object)

傳回值,這個值指出此執行個體是否與指定的物件相等。Returns a value that indicates whether this instance is equal to a specified object.

(繼承來源 Attribute)
GetHashCode()

傳回這個執行個體的雜湊碼。Returns the hash code for this instance.

(繼承來源 Attribute)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
IsDefaultAttribute()

在衍生類別中覆寫時,表示這個執行個體的值是衍生類別的預設值。When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.

(繼承來源 Attribute)
Match(Object)

在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(繼承來源 Attribute)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

明確介面實作

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。Maps a set of names to a corresponding set of dispatch identifiers.

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

擷取物件的類型資訊,可以用來取得介面的類型資訊。Retrieves the type information for an object, which can be used to get the type information for an interface.

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

擷取物件提供的類型資訊介面數目 (0 或 1)。Retrieves the number of type information interfaces that an object provides (either 0 or 1).

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

提供物件所公開的屬性和方法的存取權。Provides access to properties and methods exposed by an object.

(繼承來源 Attribute)

適用於