コード例 #1
0
ファイル: Program.cs プロジェクト: daviid1922/Wyklad-Sample
        public ICommand CreateCommand(ICommand cmd)
        {
            ICommand withTransaction           = new WithTransaction(cmd);
            ICommand withLoggingAndTransaction = new LoggingDecorator(withTransaction);

            return(withLoggingAndTransaction);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: pawel54321/Wyklad-Sample
        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);
        }