IDataServiceConfiguration.MaxExpandDepth 属性

定义

获取或设置在所有对数据服务的请求的单一 $expand 路径中受支持的最大段数。Gets or sets a maximum number of segments supported in a single $expand path for all requests to the data service.

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

属性值

Int32

整数,表示 $expand 路径中支持的最大段数。Integer representing the maximum number of supported segments in $expand path.

注解

如果超出限制,则返回状态代码“400 错误的请求”。If the limit is exceeded, a 400 Bad Request status code is returned. 指定的值必须介于0和之间 int.MaxValue ; 否则, ArgumentOutOfRangeException 将引发。The value specified must be between 0 and int.MaxValue; otherwise, an ArgumentOutOfRangeException is thrown.

下面的查询字符串示例在第一个 $expand 路径中有两段,在第二个 $expand 路径中有一段:The following query string sample has two segments in the first $expand path and one in the second $expand path:

适用于