IDataServiceConfiguration.MaxExpandDepth 屬性
取得或設定資料服務的所有要求中單一 $expand 路徑支援的區段數目上限。
命名空間: System.Data.Services
組件: Microsoft.Data.Services (在 Microsoft.Data.Services.dll 中)
語法
'宣告
Property MaxExpandDepth As Integer
Get
Set
'用途
Dim instance As IDataServiceConfiguration
Dim value As Integer
value = instance.MaxExpandDepth
instance.MaxExpandDepth = value
int MaxExpandDepth { get; set; }
property int MaxExpandDepth {
int get ();
void set (int value);
}
abstract MaxExpandDepth : int with get, set
function get MaxExpandDepth () : int
function set MaxExpandDepth (value : int)
屬性值
型別:System.Int32
整數,表示 $expand 路徑支援的區段數目上限。
備註
如果超過限制,則傳回 400「不正確的要求」狀態碼。 指定的值必須介於 0 和 int.MaxValue 之間,否則會擲回 ArgumentOutOfRangeException。
下列查詢字串範例中,第一個 $expand 路徑有兩個區段,第二個 $expand 路徑有一個區段: