ServiceHealthBehavior.GetHttpResponseCode(ServiceHostBase, String[]) 方法

定义

分析查询字符串字段并返回其定义的 HTTP 响应代码。

protected:
 virtual System::Net::HttpStatusCode GetHttpResponseCode(System::ServiceModel::ServiceHostBase ^ serviceHost, cli::array <System::String ^> ^ queries);
protected virtual System.Net.HttpStatusCode GetHttpResponseCode (System.ServiceModel.ServiceHostBase serviceHost, string[] queries);
abstract member GetHttpResponseCode : System.ServiceModel.ServiceHostBase * string[] -> System.Net.HttpStatusCode
override this.GetHttpResponseCode : System.ServiceModel.ServiceHostBase * string[] -> System.Net.HttpStatusCode
Protected Overridable Function GetHttpResponseCode (serviceHost As ServiceHostBase, queries As String()) As HttpStatusCode

参数

serviceHost
ServiceHostBase

包含启用了 ServiceHealthBehavior 的 WCF 服务的服务主机实例。

queries
String[]

包含查询字符串的字段/值对的数组。

返回

HTTP 响应代码。

例外

serviceHostnull

适用于