Non-virtual interface pattern: Difference between revisions

Content deleted Content added
Improved the C# Example and added comments.
m Improved the comments in C# Example
Line 37:
// The invariant processing for the method is defined in the non virtual interface.
// The behaviour so defined is inherited by all derived classes.
// For example, creating and committing a transaction.
public void Save()
{
Line 44 ⟶ 45:
}
// VariantThe variant processing for the method is defined in the subclass interface.
// This behaviour can be customised as needed by subclasses.
// For example the specific implementation of saving data to the database.
protected abstract void CoreSave();
}