public void Execute() { var document = _documentHistoryCommands?.RemoveLast(); var command = _documentCommandFactory?.CreateCommand(document); command?.Execute(); }
public void Execute() { foreach (var doc in _closedDocuments) { var cmd = _documentCommandFactory?.CreateCommand(doc); cmd?.Execute(); } _documentHistoryCommands?.Remove(_closedDocuments); }