ServiceBehaviorAttribute.MaxItemsInObjectGraph Property

Definition

取得或設定已序列化之物件中允許的項目數目上限。Gets or sets the maximum number of items allowed in a serialized object.

public:
 property int MaxItemsInObjectGraph { int get(); void set(int value); };
public int MaxItemsInObjectGraph { get; set; }
member this.MaxItemsInObjectGraph : int with get, set
Public Property MaxItemsInObjectGraph As Integer

Property Value

Int32

物件中允許的項目數目上限。The maximum number of items allowed in an object. 預設值為 65536 個位元組 (64KB)。The default is 65536 bytes (64KB).

Remarks

使用 MaxItemsInObjectGraph 屬性,即可設定物件圖形中已序列化項目的數目限制。Use the MaxItemsInObjectGraph property set a limit on the number of items in an object graph that are serialized. 您也可以使用應用程式佈建檔中的<dataContractSerializer>元素來設定此屬性。You can also set this property using the <dataContractSerializer> element in an application configuration file.

Applies to