HttpContextExtensions.RegisterForDispose Method
This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code..
Namespace: System.Web.WebPages
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Sub RegisterForDispose ( _
context As HttpContextBase, _
resource As IDisposable _
)
'Usage
Dim context As HttpContextBase
Dim resource As IDisposable
context.RegisterForDispose(resource)
public static void RegisterForDispose(
this HttpContextBase context,
IDisposable resource
)
[ExtensionAttribute]
public:
static void RegisterForDispose(
HttpContextBase^ context,
IDisposable^ resource
)
static member RegisterForDispose :
context:HttpContextBase *
resource:IDisposable -> unit
public static function RegisterForDispose(
context : HttpContextBase,
resource : IDisposable
)
Parameters
- context
Type: System.Web.HttpContextBase
- resource
Type: System.IDisposable
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type HttpContextBase. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.111) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.111).