예제 #1
0
 /// <inheritdoc/>
 public void Dispose()
 {
     dirtyingOperationsMap.Clear();
     transactionStack.TransactionCompleted     -= TransactionCompleted;
     transactionStack.TransactionRollbacked    -= TransactionStatusChanged;
     transactionStack.TransactionRollforwarded -= TransactionStatusChanged;
     transactionStack.TransactionDiscarded     -= TransactionDiscarded;
     transactionStack.Cleared -= StackCleared;
     transactionStack          = null;
 }
예제 #2
0
 /// <inheritdoc/>
 public void Dispose()
 {
     dirtyingOperationsMap.Clear();
     transactionStack.TransactionCompleted -= TransactionCompleted;
     transactionStack.TransactionRollbacked -= TransactionStatusChanged;
     transactionStack.TransactionRollforwarded -= TransactionStatusChanged;
     transactionStack.TransactionDiscarded -= TransactionDiscarded;
     transactionStack.Cleared -= StackCleared;
     transactionStack = null;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <seealso cref="DirtiableManager"/> class.
 /// </summary>
 /// <param name="transactionStack"></param>
 public DirtiableManager(ITransactionStack transactionStack)
 {
     if (transactionStack == null) throw new ArgumentNullException(nameof(transactionStack));
     this.transactionStack = transactionStack;
     transactionStack.TransactionCompleted += TransactionCompleted;
     transactionStack.TransactionRollbacked += TransactionStatusChanged;
     transactionStack.TransactionRollforwarded += TransactionStatusChanged;
     transactionStack.TransactionDiscarded += TransactionDiscarded;
     transactionStack.Cleared += StackCleared;
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <seealso cref="DirtiableManager"/> class.
 /// </summary>
 /// <param name="transactionStack"></param>
 public DirtiableManager([NotNull] ITransactionStack transactionStack)
 {
     if (transactionStack == null)
     {
         throw new ArgumentNullException(nameof(transactionStack));
     }
     this.transactionStack = transactionStack;
     transactionStack.TransactionCompleted     += TransactionCompleted;
     transactionStack.TransactionRollbacked    += TransactionStatusChanged;
     transactionStack.TransactionRollforwarded += TransactionStatusChanged;
     transactionStack.TransactionDiscarded     += TransactionDiscarded;
     transactionStack.Cleared += StackCleared;
 }
예제 #5
0
 public UndoRedoService(int stackCapacity)
 {
     stack = TransactionStackFactory.Create(stackCapacity);
     dirtiableManager = new DirtiableManager(stack);
 }
예제 #6
0
 public UndoRedoService(int stackCapacity)
 {
     stack = TransactionStackFactory.Create(stackCapacity);
     stack.TransactionCompleted += TransactionCompleted;
     dirtiableManager            = new DirtiableManager(stack);
 }