Table of Contents

Method TakeOwnership

Namespace
MVVrus.AspNetCore.ActiveSession
Assembly
MVVrus.AspNetCore.ActiveSession.dll

TakeOwnership(ILocalSession, IDisposable)

Pass responsibility of disposing the disposable object passed to an object implementing the ILocalSession interface.

public static IDisposable TakeOwnership(this ILocalSession Session, IDisposable Disposable)

Parameters

Session ILocalSession

The ILocalSession implementation to which the responsibility is to be passed.

Disposable IDisposable

The disposable object passed.

Returns

IDisposable

The registration object. Dispose it to dispose the object passed and to recall the responsibility.

Exceptions

InvalidOperationException

Raised if an attempt to pass reponsibility to an unavalable session was detected.