C# Класс 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.
Наследование: IList, ICollection, IEnumerable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
IList bool
IList int
IList void
IList void
NSTraceListeners System
this objectIList.System

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Add() публичный Метод

Adds a TraceListener to the list.
public Add ( TraceListener listener ) : int
listener System.Diagnostics.TraceListener /// A /// TraceListener /// to add to the list. ///
Результат int

AddRange() публичный Метод

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. ///
Результат void

AddRange() публичный Метод

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. ///
Результат void

AddRange() публичный Метод

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. ///
Результат void

Clear() публичный Метод

Clears all the listeners from the list.
public Clear ( ) : void
Результат void

Contains() публичный Метод

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. ///
Результат bool

CopyTo() публичный Метод

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
Результат void

CopyTo() публичный Метод

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. ///
Результат void

GetEnumerator() публичный Метод

Gets an enumerator for this list.
public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

IndexOf() публичный Метод

Gets the index of the specified listener.
public IndexOf ( TraceListener listener ) : int
listener System.Diagnostics.TraceListener /// A /// TraceListener /// to find in the list. ///
Результат int

Insert() публичный Метод

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. ///
Результат void

Remove() публичный Метод

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. ///
Результат void

Remove() публичный Метод

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. ///
Результат void

RemoveAt() публичный Метод

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. ///
Результат void

this() публичный Метод

Gets or sets the TraceListener at the specified index.
Note that the index is zero-based.
public this ( int index ) : TraceListener
index int
Результат System.Diagnostics.TraceListener

this() публичный Метод

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
Результат System.Diagnostics.TraceListener