public override void Undo() { // format the string, then append the string to log.txt file String message = String.Format("{0} ({1}): Undo - {2}", DateTime.Now.ToString(CultureInfo.CurrentCulture), DecoratedMongoDbQuery.GetType().Name, DecoratedMongoDbQuery.ToString()); File.AppendAllText(@"log.txt", message + Environment.NewLine); Console.WriteLine(message); DecoratedMongoDbQuery.Undo(); }
public override void Undo() { // This impl can be changed in the future, for now it prints into console some logging information of the // query being executed. Could be used for logging to external file or using some logging library String message = String.Format("{0} ({1}): Undo - {2}", DateTime.Now.ToString(CultureInfo.CurrentCulture), DecoratedMongoDbQuery.GetType().Name, DecoratedMongoDbQuery.ToString()); File.AppendAllText(@"log.txt", message + Environment.NewLine); Console.WriteLine(message); DecoratedMongoDbQuery.Undo(); }