HttpRequestMessageExtensions.RegisterForDispose Method

 

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticRegisterForDispose(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_staticRegisterForDispose(HttpRequestMessage, IEnumerable<IDisposable>)

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.

public static void RegisterForDispose(
	this HttpRequestMessage request,
	IDisposable resource
)

Parameters

request
Type: System.Net.Http.HttpRequestMessage

The HTTP request controlling the lifecycle of resource.

resource
Type: System.IDisposable

The resource to dispose when request is being disposed.

Return to top

HttpRequestMessageExtensions.RegisterForDispose Method (HttpRequestMessage, IEnumerable<IDisposable>)

public static void RegisterForDispose(
	this HttpRequestMessage request,
	IEnumerable<IDisposable> resources
)
Return to top
Show: