Table of Contents

Class StagedOperation

Namespace
NanoByte.Common
Assembly
NanoByte.Common.dll

Common base class for operations that are first staged and then either committed or rolled back.

[MustDisposeResource]
public abstract class StagedOperation
Inheritance
StagedOperation
Extension Methods

Methods

Commit()

Commits the Stage()d changes.

public void Commit()

Dispose()

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

public virtual void Dispose()

OnCommit()

Template method to commit the changes made by OnStage().

protected abstract void OnCommit()

OnRollback()

Template method to revert any changes made by OnStage().

protected abstract void OnRollback()

OnStage()

Template method to stage changes.

protected abstract void OnStage()

Stage()

Stages changes for later Commit() or rollback.

public void Stage()