Share via


HttpRequestMessageExtensions.RegisterForDispose Method

 

Namespace:   System.Net.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static RegisterForDispose(HttpRequestMessage, IDisposable)

Adds the given resource to a list of resources that will be disposed by a host once the request is disposed.

System_CAPS_pubmethodSystem_CAPS_static 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

  • resource
    Type: System.IDisposable

    The 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

Return to top