HttpRequestMessageExtensions.RegisterForDispose Method
Namespace: System.Net.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
RegisterForDispose(HttpRequestMessage, IDisposable) | Adds the given resource to a list of resources that will be disposed by a host once the request is disposed. |
|
RegisterForDispose(HttpRequestMessage, IEnumerable<IDisposable>) |
See Also
HttpRequestMessageExtensions Class
System.Net.Http Namespace
Return to top
HttpRequestMessageExtensions.RegisterForDispose Method (HttpRequestMessage, IDisposable)
Adds the given resource to a list of resources that will be disposed by a host once the request is disposed.
Syntax
public static void RegisterForDispose(
this HttpRequestMessage request,
IDisposable resource
)
public:
[ExtensionAttribute]
static void RegisterForDispose(
HttpRequestMessage^ request,
IDisposable^ resource
)
static member RegisterForDispose :
request:HttpRequestMessage *
resource:IDisposable -> unit
<ExtensionAttribute>
Public Shared Sub RegisterForDispose (
request As HttpRequestMessage,
resource As IDisposable
)
Parameters
request
Type: System.Net.Http.HttpRequestMessageThe HTTP request controlling the lifecycle of resource.
resource
Type: System.IDisposableThe resource to dispose when request is being disposed.
Return to top
HttpRequestMessageExtensions.RegisterForDispose Method (HttpRequestMessage, IEnumerable<IDisposable>)
Syntax
public static void RegisterForDispose(
this HttpRequestMessage request,
IEnumerable<IDisposable> resources
)
public:
[ExtensionAttribute]
static void RegisterForDispose(
HttpRequestMessage^ request,
IEnumerable<IDisposable^>^ resources
)
static member RegisterForDispose :
request:HttpRequestMessage *
resources:IEnumerable<IDisposable> -> unit
<ExtensionAttribute>
Public Shared Sub RegisterForDispose (
request As HttpRequestMessage,
resources As IEnumerable(Of IDisposable)
)
Parameters
- request
Type: System.Net.Http.HttpRequestMessage
- resources
Type: System.Collections.Generic.IEnumerable<IDisposable>
Return to top