using System;
namespace System.Diagnostics
{
/// Indicates whether a listener should trace a message based on the source of a trace.
/// 2
// Token: 0x020000F1 RID: 241
public class SourceFilter : TraceFilter
{
/// Initializes a new instance of the class, specifying the name of the trace source.
/// The name of the trace source.
// Token: 0x0600088F RID: 2191 RVA: 0x00016B88 File Offset: 0x00014D88
public SourceFilter(string source)
{
if (source == null)
{
throw new ArgumentNullException("source");
}
this.source = source;
}
/// Gets or sets the name of the trace source.
/// The name of the trace source.
/// The value is null.
/// 2
// Token: 0x17000243 RID: 579
// (get) Token: 0x06000890 RID: 2192 RVA: 0x00016BA8 File Offset: 0x00014DA8
// (set) Token: 0x06000891 RID: 2193 RVA: 0x00016BB0 File Offset: 0x00014DB0
public string Source
{
get
{
return this.source;
}
set
{
if (this.source == null)
{
throw new ArgumentNullException("value");
}
this.source = value;
}
}
/// Determines whether the trace listener should trace the event.
/// true if the trace should be produced; otherwise, false.
/// An object that represents the information cache for the trace event.
/// The name of the source.
/// One of the enumeration values that identifies the event type.
/// A trace identifier number.
/// The format to use for writing an array of arguments or a message to write.
/// An array of argument objects.
/// A trace data object.
/// An array of trace data objects.
///
/// is null.
/// 2
// Token: 0x06000892 RID: 2194 RVA: 0x00016BD0 File Offset: 0x00014DD0
public override bool ShouldTrace(TraceEventCache cache, string source, TraceEventType eventType, int id, string formatOrMessage, object[] args, object data1, object[] data)
{
return source == this.source;
}
// Token: 0x040002AB RID: 683
private string source;
}
}