//
// System.Diagnostics.TraceSwtich.cs
//
// Author:
// John R. Hicks (angryjohn69@nc.rr.com)
//
// (C) 2001
//
namespace System.Diagnostics
{
///
/// Multi-level switch to provide tracing and debug output without
/// recompiling.
///
public class TraceSwitch : Switch
{
private TraceLevel level;
private bool traceError = false;
private bool traceInfo = false;
private bool traceVerbose = false;
private bool traceWarning = false;
///
/// Initializes a new instance
///
/// Name for the switch
/// Description of the switch
public TraceSwitch(string displayName, string description)
: base(displayName, description)
{
}
///
/// Gets or sets the trace level that specifies the messages to
/// output for tracing and debugging.
///
public TraceLevel Level
{
get
{
return level;
}
set
{
level = value;
}
}
///
/// Gets a value indicating whether the Level is set to Error,
/// Warning, Info, or Verbose.
///
public bool TraceError
{
get
{
return traceError;
}
}
///
/// Gets a value indicating whether the Level is set to Info or Verbose.
///
public bool TraceInfo
{
get
{
return traceInfo;
}
}
///
/// Gets a value indicating whether the Level is set to Verbose.
///
public bool TraceVerbose
{
get
{
return traceVerbose;
}
}
///
/// Gets a value indicating whether the Level is set to
/// Warning, Info, or Verbose.
///
public bool TraceWarning
{
get
{
return traceWarning;
}
}
}
}