C# Class NanoByte.Common.StagedOperation

Common base class for operations that are first staged and then either commited or rolled back.
Inheritance: IDisposable
Exibir arquivo Open project: nano-byte/common

Public Methods

Method Description
Commit ( ) : void

Commits the Staged changes.

Dispose ( ) : void

Performs a rollback of all changes made by Stage if Commit has not been called and completed yet.

Stage ( ) : void

Stages changes for later Commit or rollback.

Protected Methods

Method Description
Dispose ( bool disposing ) : void
OnCommit ( ) : void

Template method to commit the changes made by OnStage.

OnRollback ( ) : void

Template method to revert any changes made by OnStage.

OnStage ( ) : void

Template method to stage changes.

Method Details

Commit() public method

Commits the Staged changes.
public Commit ( ) : void
return void

Dispose() public method

Performs a rollback of all changes made by Stage if Commit has not been called and completed yet.
public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

OnCommit() protected abstract method

Template method to commit the changes made by OnStage.
protected abstract OnCommit ( ) : void
return void

OnRollback() protected abstract method

Template method to revert any changes made by OnStage.
protected abstract OnRollback ( ) : void
return void

OnStage() protected abstract method

Template method to stage changes.
protected abstract OnStage ( ) : void
return void

Stage() public method

Stages changes for later Commit or rollback.
public Stage ( ) : void
return void