SPHttpThrottleSettings.GetHttpThrottleSettings 方法
获取子 HTTP 请求限制设置的指定对象。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function GetHttpThrottleSettings ( _
parent As SPPersistedObject _
) As SPHttpThrottleSettings
用法
Dim parent As SPPersistedObject
Dim returnValue As SPHttpThrottleSettings
returnValue = SPHttpThrottleSettings.GetHttpThrottleSettings(parent)
public static SPHttpThrottleSettings GetHttpThrottleSettings(
SPPersistedObject parent
)
参数
parent
类型:Microsoft.SharePoint.Administration.SPPersistedObject其设置将返回的对象。
返回值
类型:Microsoft.SharePoint.Utilities.SPHttpThrottleSettings
一个对象,包含 HTTP 请求parent的限制的设置。这可能是空引用(无 在 Visual Basic 中)。
备注
如果parent是管理中心 Web 应用程序,则值为空引用(无 在 Visual Basic 中)。
示例
下面的代码示例演示在使用此方法。有关完整的示例,请参见How to: Create and Register or Deregister a Request Classifier。
Uri webApplicationUri = new Uri("Http://localhost/");
SPWebApplication webApplication = SPWebApplication.Lookup(webApplicationUri);
SPHttpThrottleSettings throttleSettings = SPHttpThrottleSettings.GetHttpThrottleSettings(webApplication);
Dim webApplicationUri As New Uri("Http://localhost/")
Dim webApplication As SPWebApplication = SPWebApplication.Lookup(webApplicationUri)
Dim throttleSettings As SPHttpThrottleSettings = SPHttpThrottleSettings.GetHttpThrottleSettings(webApplication)