Provides a very simple ITextUndoHistory implementation. Sufficient for us to test simple undo scenarios inside the unit tests
Наследование: ITextUndoHistory
Пример #1
0
		ITextUndoHistory ITextUndoHistoryRegistry.RegisterHistory(object context) {
			ITextUndoHistory history;
			if (!_map.TryGetValue(context, out history)) {
				history = new BasicUndoHistory(context);
				foreach (var c in GetDependentContexts(context)) {
					// If this context already has an attached history, don't replace it.
					// This happens for ephemeral projection buffers for previews created
					// by the diff for a quick fix.
					_map.GetValue(c, _ => history);
				}
			}
			return history;
		}
Пример #2
0
		internal BasicUndoTransaction(BasicUndoHistory textUndoHistory, string description) {
			_textUndoHistory = textUndoHistory;
			Description = description;
		}