Example #1
0
        public ICommand CreateCommand(ICommand cmd)
        {
            ICommand withTransaction           = new WithTransaction(cmd);
            ICommand withLoggingAndTransaction = new LoggingDecorator(withTransaction);

            return(withLoggingAndTransaction);
        }
Example #2
0
        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);
        }