ServiceHealthBehavior.GetHttpResponseCode(ServiceHostBase, String[]) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
分析查询字符串字段并返回其定义的 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 响应代码。
例外
serviceHost
为 null
。