public ICommand CreateCommand(ICommand cmd) { ICommand withTransaction = new WithTransaction(cmd); ICommand withLoggingAndTransaction = new LoggingDecorator(withTransaction); return(withLoggingAndTransaction); }
public ICommand CreateChangeUserPasswordCmd(int userId, string oldPassword, string newPassword) { ICommand cmd = new ChangeUserPasswordCmd(userId, oldPassword, newPassword); ICommand withTransaction = new WithTransaction(cmd); ICommand withLoggingAndTransaction = new LoggingDecorator(withTransaction); return(withLoggingAndTransaction); }