Mercurial > pub > ImplabNet
comparison Implab/Diagnostics/TraceEvent.cs @ 192:f1da3afc3521 release v2.1
Слияние с v2
author | cin |
---|---|
date | Fri, 22 Apr 2016 13:10:34 +0300 |
parents | 6c49d02a9a05 |
children | ea485487a424 |
comparison
equal
deleted
inserted
replaced
71:1714fd8678ef | 192:f1da3afc3521 |
---|---|
1 using System; | 1 using System; |
2 using System.Collections.Generic; | |
3 using System.Linq; | |
4 using System.Text; | |
5 | 2 |
6 namespace Implab.Diagnostics { | 3 namespace Implab.Diagnostics { |
7 public class TraceEvent { | 4 public class TraceEvent { |
8 public string Message { | 5 public string Message { |
9 get; | 6 get; |
19 EventType = type; | 16 EventType = type; |
20 Message = message; | 17 Message = message; |
21 } | 18 } |
22 | 19 |
23 public override string ToString() { | 20 public override string ToString() { |
24 if (EventType == TraceEventType.Information) | 21 /*return EventType == TraceEventType.Information ? Message : String.Format("{0}: {1}", EventType, Message);*/ |
25 return Message; | 22 return Message; |
26 else | |
27 return String.Format("{0}: {1}", EventType, Message); | |
28 } | 23 } |
29 | 24 |
30 public static TraceEvent Create(TraceEventType type, string format, params object[] args) { | 25 public static TraceEvent Create(TraceEventType type, string format, params object[] args) { |
31 return new TraceEvent(type, format == null ? String.Empty : String.Format(format, args)); | 26 return new TraceEvent(type, format == null ? String.Empty : String.Format(format, args)); |
32 } | 27 } |