NanoByte.Common
Public Member Functions | Protected Member Functions | List of all members
NanoByte.Common.StagedOperation Class Referenceabstract

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

Inheritance diagram for NanoByte.Common.StagedOperation:

Public Member Functions

void Stage ()
 Stages changes for later Commit or rollback. More...
 
void Commit ()
 Commits the Staged changes. More...
 
void Dispose ()
 Performs a rollback of all changes made by Stage if Commit has not been called and completed yet. More...
 

Protected Member Functions

abstract void OnStage ()
 Template method to stage changes. More...
 
abstract void OnCommit ()
 Template method to commit the changes made by OnStage. More...
 
virtual void Dispose (bool disposing)
 
abstract void OnRollback ()
 Template method to revert any changes made by OnStage. More...
 

Detailed Description

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

Member Function Documentation

◆ Commit()

void NanoByte.Common.StagedOperation.Commit ( )
inline

Commits the Staged changes.

◆ Dispose()

void NanoByte.Common.StagedOperation.Dispose ( )
inline

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

◆ OnCommit()

abstract void NanoByte.Common.StagedOperation.OnCommit ( )
protectedpure virtual

Template method to commit the changes made by OnStage.

◆ OnRollback()

abstract void NanoByte.Common.StagedOperation.OnRollback ( )
protectedpure virtual

Template method to revert any changes made by OnStage.

◆ OnStage()

abstract void NanoByte.Common.StagedOperation.OnStage ( )
protectedpure virtual

Template method to stage changes.

◆ Stage()

void NanoByte.Common.StagedOperation.Stage ( )
inline

Stages changes for later Commit or rollback.


The documentation for this class was generated from the following file: