C# Class EditorConfig.VisualStudio.Helpers.UndoTransactionHelper

A helper class for performing actions within the context of an undo transaction.
ファイルを表示 Open project: editorconfig/editorconfig-visualstudio

Public Methods

Method Description
Run ( System.Action tryAction, Action catchAction = null ) : void

Runs the specified try action within a try block, and conditionally the catch action within a catch block.

Run ( Func undoConditions, System.Action tryAction, Action catchAction ) : void

Runs the specified try action within a try block, and conditionally the catch action within a catch block all conditionally within the context of an undo transaction.

UndoTransactionHelper ( _DTE package, string transactionName ) : System

Initializes a new instance of the UndoTransactionHelper class.

Method Details

Run() public method

Runs the specified try action within a try block, and conditionally the catch action within a catch block.
public Run ( System.Action tryAction, Action catchAction = null ) : void
tryAction System.Action The action to be performed within a try block.
catchAction Action The action to be performed wihin a catch block.
return void

Run() public method

Runs the specified try action within a try block, and conditionally the catch action within a catch block all conditionally within the context of an undo transaction.
public Run ( Func undoConditions, System.Action tryAction, Action catchAction ) : void
undoConditions Func A set of additional conditions for wrapping in an undo context.
tryAction System.Action The action to be performed within a try block.
catchAction Action The action to be performed wihin a catch block.
return void

UndoTransactionHelper() public method

Initializes a new instance of the UndoTransactionHelper class.
public UndoTransactionHelper ( _DTE package, string transactionName ) : System
package _DTE The hosting package.
transactionName string The name of the transaction.
return System