HttpContext.DisposeOnPipelineCompleted(IDisposable) 方法

定义

启动一个对象 Dispose() 方法的调用,当此请求 AspNetWebSocket 的连接部分完成时。Enables an object's Dispose() method to be called when the AspNetWebSocket connection part of this request is completed.

public:
 System::Web::ISubscriptionToken ^ DisposeOnPipelineCompleted(IDisposable ^ target);
public System.Web.ISubscriptionToken DisposeOnPipelineCompleted (IDisposable target);
member this.DisposeOnPipelineCompleted : IDisposable -> System.Web.ISubscriptionToken
Public Function DisposeOnPipelineCompleted (target As IDisposable) As ISubscriptionToken

参数

target
IDisposable

在请求的 Dispose() 连接部分完成时必须调动用其 AspNetWebSocket 方法的对象。The object whose Dispose() method must be called when the AspNetWebSocket connection part of the request is completed.

返回

订阅标记。The subscription token.

注解

在请求的 HTTP 部分和 AspNetWebSocket 连接结束后,将调用目标对象的 Dispose 方法。The Dispose method of the target object is called after both the HTTP part of the request and the AspNetWebSocket connection have ended. HttpContext 对象不可用于检查。The HttpContext object is not available for inspection.

适用于