Exemplo n.º 1
0
 public TextUndoTransaction(TextUndoHistory history, ITextUndoTransaction parent, string description)
 {
     this.history           = history ?? throw new ArgumentNullException(nameof(history));
     Parent                 = parent;
     undoPrimitives         = new List <ITextUndoPrimitive>();
     readOnlyUndoPrimitives = new ReadOnlyCollection <ITextUndoPrimitive>(undoPrimitives);
     State            = UndoTransactionState.Open;
     this.description = description ?? throw new ArgumentNullException(nameof(description));
 }
Exemplo n.º 2
0
		public TextUndoTransaction(TextUndoHistory history, ITextUndoTransaction parent, string description) {
			if (history == null)
				throw new ArgumentNullException(nameof(history));
			if (description == null)
				throw new ArgumentNullException(nameof(description));
			this.history = history;
			Parent = parent;
			undoPrimitives = new List<ITextUndoPrimitive>();
			readOnlyUndoPrimitives = new ReadOnlyCollection<ITextUndoPrimitive>(undoPrimitives);
			State = UndoTransactionState.Open;
			this.description = description;
		}