Scope class

Executes the specified delegate when disposed.

public sealed class Scope : IDisposable

Public Members

name description
static readonly Empty An empty scope, which does nothing when disposed.
static Create(…) Creates a Scope for the specified delegate.
static Create<T>(…) Creates a Scope that disposes the specified object.
Cancel() Cancel the call to the encapsulated delegate.
Dispose() Calls the encapsulated delegate.
Transfer() Returns a new Scope that will call the encapsulated delegate.

See Also