Пример #1
0
 private void AddLog(HtmlLog log)
 {
     if (log == null)
     {
         return;
     }
     WriteToHtmlLog(log.ToHtml());
 }
Пример #2
0
            public void Log(string log, string message, LogType logType)
            {
                var htmlLog = new HtmlLog()
                {
                    Message = message, LogTime = DateTime.Now, Type = LogType.Warning
                };

                this.AddLog(htmlLog);
            }
Пример #3
0
            public void LogError(string message, Exception exception)
            {
                var log = new HtmlLog()
                {
                    Message = message, LogTime = DateTime.Now, Type = LogType.Error, Exception = exception
                };

                this.AddLog(log);
            }
Пример #4
0
        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());
        }