IDataServiceConfiguration.MaxExpandDepth 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為所有向資料服務請求,取得或設定單一路徑中最多支援 $expand 的區段數量。
public:
property int MaxExpandDepth { int get(); void set(int value); };
public int MaxExpandDepth { get; set; }
member this.MaxExpandDepth : int with get, set
Public Property MaxExpandDepth As Integer
屬性值
整數代表路徑中 $expand 最大支援的段數。
備註
若超過限制,會回傳 400 錯誤請求狀態碼。 指定的值必須介於 0 與 int.MaxValue;否則會拋出 an ArgumentOutOfRangeException 。
以下查詢字串範例在第一 $expand 條路徑中有兩個段,第二條路徑有一個 $expand :