C# Class Composable.System.Disposable

Simple utility class that calls the supplied action when the instance is disposed. Gets rid of the need to create a ton of small classes to do cleanup.
Inheritance: IDisposable
Show file Open project: mlidbom/Composable.Monolithic

Public Methods

Method Description
Create ( System.Action action ) : IDisposable

Constructs an object that will call when disposed.

Disposable ( System.Action action ) : System

Constructs an instance that will call when disposed.

Dispose ( ) : void

Invokes the action passed to the constructor.

Method Details

Create() public static method

Constructs an object that will call when disposed.
public static Create ( System.Action action ) : IDisposable
action System.Action
return IDisposable

Disposable() public method

Constructs an instance that will call when disposed.
public Disposable ( System.Action action ) : System
action System.Action
return System

Dispose() public method

Invokes the action passed to the constructor.
public Dispose ( ) : void
return void