コード例 #1
0
ファイル: Program.cs プロジェクト: QJQ-V/design-patterns
        static void Main(string[] args)
        {
            AbstractLogger loggerChain = getChainOfLoggers();

            loggerChain.LogMessage(AbstractLogger.INFO,
                                   "This is an information.");

            loggerChain.LogMessage(AbstractLogger.DEBUG,
                                   "This is an debug level information.");

            loggerChain.LogMessage(AbstractLogger.ERROR,
                                   "This is an error information.");

            Console.ReadKey();
        }
コード例 #2
0
 public void SetNextLogger(AbstractLogger nextLogger)
 {
     this.nextLogger = nextLogger;
 }