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(); }
private void SaveSimpleLogEntry(SimpleLogEntry logEntry) { Console.WriteLine("Simple log was saved"); }
void ILogEntryVisitor.Visit(SimpleLogEntry simpleLogEntry) { SaveSimpleLogEntry(simpleLogEntry); }