示例#1
0
 public static OldCleanState GetInstance()
 {
     if (_instance == null)
     {
         lock (SyncRoot)
         {
             if (_instance == null)
             {
                 _instance = new OldCleanState();
             }
         }
     }
     return(_instance);
 }
示例#2
0
 public override void Commit(APersistenceObject persistenceObject)
 {
     PersistenceFacade.GetInstance().Insert(persistenceObject);
     persistenceObject.PreviousState = this;
     persistenceObject.State         = OldCleanState.GetInstance();
 }
示例#3
0
 internal void MarkOldClean()
 {
     _previousState = _state;
     _state         = OldCleanState.GetInstance();
 }