RegisterDisposable Method

Use this method to register page-scoped objects for disposal.

Namespace:  Microsoft.CommerceServer.Runtime
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Sub RegisterDisposable ( _
    disposableObject As Object _
)
'Usage
Dim instance As CommerceContext
Dim disposableObject As Object

instance.RegisterDisposable(disposableObject)
public void RegisterDisposable(
    Object disposableObject
)
public:
void RegisterDisposable(
    Object^ disposableObject
)
public function RegisterDisposable(
    disposableObject : Object
)

Parameters

  • disposableObject
    Type: System..::.Object
    The object that implements the IDisposable interface or a __COMObject type.

Remarks

These objects will become invalid after the request is done processing and the instance of the CommerceContext class is disposed. In checked mode, this method will ensure that the object implements either the IDisposable or is a type of __COMObject. If it is not, then it will raise an error with the DebugContext object for the application.

Permissions

See Also

Reference

CommerceContext Class

CommerceContext Members

Microsoft.CommerceServer.Runtime Namespace