C# Class BytesRoad.Diag.NSTraceListeners

Provides a thread-safe list of TraceListener objects.
The TraceListenerSet class provides the same set of functionality as TraceListenerCollection provides. The reason for creating this class is inpossibility of using TraceListenerCollection due to hidden constructor.
Inheritance: IList, ICollection, IEnumerable
Show file Open project: NikolayIT/RatioMaster.NET Class Usage Examples

Private Properties

Property Type Description
IList bool
IList int
IList void
IList void
NSTraceListeners System
this objectIList.System

Public Methods

Method Description
Add ( TraceListener listener ) : int

Adds a TraceListener to the list.

AddRange ( NSTraceListeners listeners ) : void

Adds the contents of another NSTraceListeners to the list.

AddRange ( TraceListener listeners ) : void

Adds an array of TraceListener objects to the list.

AddRange ( TraceListenerCollection listeners ) : void

Adds the contents of another TraceListenerCollection to the list.

Clear ( ) : void

Clears all the listeners from the list.

Contains ( TraceListener listener ) : bool

Checks whether the list contains the specified listener.

The Contains method can confirm the existence of a TraceListener before you perform further operations.

CopyTo ( Array array, int index ) : void

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

CopyTo ( TraceListener listeners, int index ) : void

Copies a section of the current NSTraceListeners list to the specified array at the specified index.

GetEnumerator ( ) : IEnumerator

Gets an enumerator for this list.

IndexOf ( TraceListener listener ) : int

Gets the index of the specified listener.

Insert ( int index, TraceListener listener ) : void

Inserts the listener at the specified index.

Remove ( TraceListener listener ) : void

Removes from the collection the specified TraceListener.

Remove ( string name ) : void

Removes from the collection the first TraceListener with the specified name.

RemoveAt ( int index ) : void

Removes from the collection the TraceListener at the specified index.

this ( int index ) : TraceListener

Gets or sets the TraceListener at the specified index.

Note that the index is zero-based.

this ( string name ) : TraceListener

Gets the first TraceListener in the list with the specified name.

Note that the Item property is case-sensitive when searching for names.

Private Methods

Method Description
IList ( object val ) : bool

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IList ( object val ) : int

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IList ( int index, object val ) : void

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IList ( object val ) : void

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

NSTraceListeners ( ) : System
this ( int index ) : objectIList.System

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Method Details

Add() public method

Adds a TraceListener to the list.
public Add ( TraceListener listener ) : int
listener System.Diagnostics.TraceListener /// A /// TraceListener /// to add to the list. ///
return int

AddRange() public method

Adds the contents of another NSTraceListeners to the list.
public AddRange ( NSTraceListeners listeners ) : void
listeners NSTraceListeners /// Another /// NSTraceListeners /// whose contents are added to the list. ///
return void

AddRange() public method

Adds an array of TraceListener objects to the list.
public AddRange ( TraceListener listeners ) : void
listeners System.Diagnostics.TraceListener /// An array of /// TraceListener /// objects to add to the list. ///
return void

AddRange() public method

Adds the contents of another TraceListenerCollection to the list.
public AddRange ( TraceListenerCollection listeners ) : void
listeners System.Diagnostics.TraceListenerCollection /// Another /// TraceListenerCollection /// whose contents are added to the list. ///
return void

Clear() public method

Clears all the listeners from the list.
public Clear ( ) : void
return void

Contains() public method

Checks whether the list contains the specified listener.
The Contains method can confirm the existence of a TraceListener before you perform further operations.
public Contains ( TraceListener listener ) : bool
listener System.Diagnostics.TraceListener /// A TraceListener /// to find in the list. ///
return bool

CopyTo() public method

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
public CopyTo ( Array array, int index ) : void
array System.Array
index int
return void

CopyTo() public method

Copies a section of the current NSTraceListeners list to the specified array at the specified index.
public CopyTo ( TraceListener listeners, int index ) : void
listeners System.Diagnostics.TraceListener /// An array of type /// Array /// to copy the elements into. ///
index int /// The starting index number in the current list to copy from. ///
return void

GetEnumerator() public method

Gets an enumerator for this list.
public GetEnumerator ( ) : IEnumerator
return IEnumerator

IndexOf() public method

Gets the index of the specified listener.
public IndexOf ( TraceListener listener ) : int
listener System.Diagnostics.TraceListener /// A /// TraceListener /// to find in the list. ///
return int

Insert() public method

Inserts the listener at the specified index.
/// The index is not a valid index in the list. ///
public Insert ( int index, TraceListener listener ) : void
index int /// The zero-based index at which the new /// TraceListener. /// should be inserted. ///
listener System.Diagnostics.TraceListener /// A /// TraceListener /// to insert in the list. ///
return void

Remove() public method

Removes from the collection the specified TraceListener.
/// The listener does not exist in the list. ///
public Remove ( TraceListener listener ) : void
listener System.Diagnostics.TraceListener /// A /// TraceListener /// to remove from the list. ///
return void

Remove() public method

Removes from the collection the first TraceListener with the specified name.
/// A listener with the given name does not exist in the list. ///
public Remove ( string name ) : void
name string /// The case-sensitive name of the /// TraceListener /// to remove from the list. ///
return void

RemoveAt() public method

Removes from the collection the TraceListener at the specified index.
/// The index is not a valid index in the list. ///
public RemoveAt ( int index ) : void
index int /// The zero-based index of the /// TraceListener /// to remove from the list. ///
return void

this() public method

Gets or sets the TraceListener at the specified index.
Note that the index is zero-based.
public this ( int index ) : TraceListener
index int
return System.Diagnostics.TraceListener

this() public method

Gets the first TraceListener in the list with the specified name.
Note that the Item property is case-sensitive when searching for names.
public this ( string name ) : TraceListener
name string
return System.Diagnostics.TraceListener