共用方式為


HttpDiagnosticProvider 類別

定義

提供簡單的診斷功能,以追蹤和分析 Microsoft HTTP 堆疊上建置的應用程式中的 Web 流量。

public ref class HttpDiagnosticProvider sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Web.Http.Diagnostics.HttpDiagnosticsContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpDiagnosticProvider final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Web.Http.Diagnostics.HttpDiagnosticsContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpDiagnosticProvider
Public NotInheritable Class HttpDiagnosticProvider
繼承
Object Platform::Object IInspectable HttpDiagnosticProvider
屬性

Windows 需求

裝置系列
Windows Desktop Extension SDK (已於 10.0.10240.0 引進)
API contract
Windows.Web.Http.Diagnostics.HttpDiagnosticsContract (已於 v1.0 引進)

備註

HttpDiagnosticProvider 的實例會從 CreateFromProcessDiagnosticInfo 方法傳回。

方法

CreateFromProcessDiagnosticInfo(ProcessDiagnosticInfo)

根據指定的ProcessDiagnosticInfo物件建立新的HttpDiagnosticProvider

Start()

啟動 HttpDiagnosticProvider 監視附加的進程目標。

Stop()

停止 HttpDiagnosticProvider 監視附加的進程目標。

事件

RequestResponseCompleted

訂閱 RequestResponseCompleted 事件,以接收已提交要求的通知。

RequestSent

訂閱 RequestSent 事件,以接收已傳送要求的通知。

ResponseReceived

訂閱 ResponseReceived 事件,以接收已收到回應的通知。

適用於