private void AddLog(HtmlLog log) { if (log == null) { return; } WriteToHtmlLog(log.ToHtml()); }
public void Log(string log, string message, LogType logType) { var htmlLog = new HtmlLog() { Message = message, LogTime = DateTime.Now, Type = LogType.Warning }; this.AddLog(htmlLog); }
public void LogError(string message, Exception exception) { var log = new HtmlLog() { Message = message, LogTime = DateTime.Now, Type = LogType.Error, Exception = exception }; this.AddLog(log); }
public void Main() { OppBerekenaar ob = new OppBerekenaar(); ob.VoegToe(new Circle(3)); ob.VoegToe(new Square(4)); string html = new HtmlLog().Output("De totale som = " + ob.Output()); string log = new Log().Output("De totale som = " + ob.Output()); }