C# Class Microsoft.Common.Core.Disposables.Disposable.AnonymousDisposable

Represents an Action-based disposable.
Inheritance: IDisposable
Afficher le fichier Open project: Microsoft/RTVS

Méthodes publiques

Méthode Description
AnonymousDisposable ( System.Action dispose ) : System

Constructs a new disposable with the given action used for disposal.

Dispose ( ) : void

Calls the disposal action if and only if the current instance hasn't been disposed yet.

Method Details

AnonymousDisposable() public méthode

Constructs a new disposable with the given action used for disposal.
public AnonymousDisposable ( System.Action dispose ) : System
dispose System.Action Disposal action which will be run upon calling Dispose.
Résultat System

Dispose() public méthode

Calls the disposal action if and only if the current instance hasn't been disposed yet.
public Dispose ( ) : void
Résultat void