ServiceHealthBehavior.HandleHealthRequest 方法

定义

返回指定请求的响应消息。

public:
 override void HandleHealthRequest(System::ServiceModel::ServiceHostBase ^ serviceHost, System::ServiceModel::Channels::Message ^ httpGetRequest, cli::array <System::String ^> ^ queries, [Runtime::InteropServices::Out] System::ServiceModel::Channels::Message ^ % replyMessage);
public override void HandleHealthRequest (System.ServiceModel.ServiceHostBase serviceHost, System.ServiceModel.Channels.Message httpGetRequest, string[] queries, out System.ServiceModel.Channels.Message replyMessage);
override this.HandleHealthRequest : System.ServiceModel.ServiceHostBase * System.ServiceModel.Channels.Message * string[] * Message -> unit
Public Overrides Sub HandleHealthRequest (serviceHost As ServiceHostBase, httpGetRequest As Message, queries As String(), ByRef replyMessage As Message)

参数

serviceHost
ServiceHostBase

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

httpGetRequest
Message

对运行状况终结点发出的 HTTP 请求。

queries
String[]

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

replyMessage
Message

返回方法时,运行状况行为的响应消息。 此消息的内容类型为 text/htmltext/xml,具体取决于请求是针对 XML 还是 HTML。

例外

serviceHostnull

  • 或 -

httpGetRequestnull

  • 或 -

queriesnull

注解

此方法由 实例调用, ServiceHealthBehaviorBase 负责创建对运行状况终结点的响应消息。

适用于