コード例 #1
0
        static void Main(string[] args)
        {
            ExceptionLogEntry exlogEntry = new ExceptionLogEntry();
            SimpleLogEntry simpleLogEntry = new SimpleLogEntry();

            var dbsaver = new DatabaseLogSaver();
            dbsaver.SaveLogEntry(simpleLogEntry);
            dbsaver.SaveLogEntry(exlogEntry);
            Console.ReadLine();
        }
コード例 #2
0
 private void SaveException(ExceptionLogEntry logEntry)
 {
     Console.WriteLine("Exception was saved");
 }
コード例 #3
0
 void ILogEntryVisitor.Visit(ExceptionLogEntry exceptionLogEntry)
 {
     SaveException(exceptionLogEntry);
 }