diff options
author | Miguel de Icaza <miguel@gnome.org> | 2001-09-04 18:37:55 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2001-09-04 18:37:55 +0400 |
commit | 67c693c673e3cc8326ce9c79166d8f24cc7c728b (patch) | |
tree | 6dd47de3deedd7f232f9603a1cc7d90c5485af35 /mcs/class/System/System.Diagnostics/TraceSwitch.cs | |
parent | 7fd95cdcb69e5507f504708cbd5c67ba08d2b8fc (diff) |
Add System.Diagnostics to System assembly
svn path=/trunk/mcs/; revision=712
Diffstat (limited to 'mcs/class/System/System.Diagnostics/TraceSwitch.cs')
-rwxr-xr-x | mcs/class/System/System.Diagnostics/TraceSwitch.cs | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/mcs/class/System/System.Diagnostics/TraceSwitch.cs b/mcs/class/System/System.Diagnostics/TraceSwitch.cs new file mode 100755 index 00000000000..4b64d80e6ce --- /dev/null +++ b/mcs/class/System/System.Diagnostics/TraceSwitch.cs @@ -0,0 +1,97 @@ +// +// System.Diagnostics.TraceSwtich.cs +// +// Author: +// John R. Hicks (angryjohn69@nc.rr.com) +// +// (C) 2001 +// + +namespace System.Diagnostics +{ + /// <summary> + /// Multi-level switch to provide tracing and debug output without + /// recompiling. + /// </summary> + public class TraceSwitch : Switch + { + private TraceLevel level; + private bool traceError = false; + private bool traceInfo = false; + private bool traceVerbose = false; + private bool traceWarning = false; + + /// <summary> + /// Initializes a new instance + /// </summary> + /// <param name="displayName">Name for the switch</param> + /// <param name="description">Description of the switch</param> + public TraceSwitch(string displayName, string description) + : base(displayName, description) + { + } + + /// <summary> + /// Gets or sets the trace level that specifies the messages to + /// output for tracing and debugging. + /// </summary> + public TraceLevel Level + { + get + { + return level; + } + set + { + level = value; + } + + } + + /// <summary> + /// Gets a value indicating whether the Level is set to Error, + /// Warning, Info, or Verbose. + /// </summary> + public bool TraceError + { + get + { + return traceError; + } + } + + /// <summary> + /// Gets a value indicating whether the Level is set to Info or Verbose. + /// </summary> + public bool TraceInfo + { + get + { + return traceInfo; + } + } + + /// <summary> + /// Gets a value indicating whether the Level is set to Verbose. + /// </summary> + public bool TraceVerbose + { + get + { + return traceVerbose; + } + } + + /// <summary> + /// Gets a value indicating whether the Level is set to + /// Warning, Info, or Verbose. + /// </summary> + public bool TraceWarning + { + get + { + return traceWarning; + } + } + } +} |