Class StagedOperation
Common base class for operations that are first staged and then either committed or rolled back.
Namespace: NanoByte.Common
Assembly: NanoByte.Common.dll
Syntax
public abstract class StagedOperation : Object
Constructors
StagedOperation()
Declaration
protected StagedOperation()
Methods
Commit()
Commits the Stage()d changes.
Declaration
public void Commit()
Dispose()
Performs a rollback of all changes made by Stage() if Commit() has not been called and completed yet.
Declaration
public virtual void Dispose()
OnCommit()
Template method to commit the changes made by OnStage().
Declaration
protected abstract void OnCommit()
OnRollback()
Template method to revert any changes made by OnStage().
Declaration
protected abstract void OnRollback()
OnStage()
Template method to stage changes.
Declaration
protected abstract void OnStage()
Stage()
Stages changes for later Commit() or rollback.
Declaration
public void Stage()