public void OnCommandExecuted(CommandBase command, bool isPartOfMacro, CommandBase macroCommand, bool isUndo, bool isRedo) { if (isPartOfMacro) { return; } else if (LoggingStarted && !LoggingPaused) { XElement serializedCommand = CommandSerializer.SerializeCommand(command, isUndo, isRedo); SerializationDocument.Root.Add(serializedCommand); } }