public static CommandExecutionExpression With(Solution solution, bool throwOnFailure = true) { _target = solution; _forceThrow = throwOnFailure; RippleLog.RemoveFileListener(); return(new CommandExecutionExpression(() => { _target = null; _forceThrow = false; RippleLog.AddFileListener(); })); }
public static CommandExecutionExpression With(Solution solution, bool throwOnFailure = true, bool resetSolution = false) { _target = solution; _forceThrow = throwOnFailure; _resetSolution = resetSolution; RippleLog.RemoveFileListener(); RippleFileSystem.StubCurrentDirectory(solution.Directory); return(new CommandExecutionExpression(() => { _target = null; _forceThrow = false; _resetSolution = false; RippleLog.AddFileListener(); RippleFileSystem.Live(); })); }