Table of Contents

Class LogSourceDataCollection

Namespace
Microsoft.Practices.EnterpriseLibrary.Logging
Assembly
Microsoft.Practices.EnterpriseLibrary.Logging.dll

Represents a collection of LogSourceData instances.

public class LogSourceDataCollection : ICollection<LogSourceData>, IEnumerable<LogSourceData>, IEnumerable
Inheritance
LogSourceDataCollection
Implements
Inherited Members

Constructors

LogSourceDataCollection()

Initializes a new instance of the LogSourceDataCollection class.

public LogSourceDataCollection()

LogSourceDataCollection(IEnumerable<LogSourceData>)

Initializes a new instance of the LogSourceDataCollection class with the specified collection.

public LogSourceDataCollection(IEnumerable<LogSourceData> collection)

Parameters

collection IEnumerable<LogSourceData>

The data collection for the new instance.

Properties

Count

Gets the number of LogSourceData objects in the LogSourceDataCollection.

public int Count { get; }

Property Value

int

IsReadOnly

Gets a value that indicates whether this collection is read-only.

public bool IsReadOnly { get; }

Property Value

bool

this[string]

Gets the specified LogSourceData object.

public LogSourceData this[string name] { get; }

Parameters

name string

The name of the log source.

Property Value

LogSourceData

The LogSourceData object.

Methods

Add(LogSourceData)

Adds a new LogSourceData object to the collection.

public void Add(LogSourceData item)

Parameters

item LogSourceData

The LogSourceData object.

Clear()

Removes all LogSourceData from the LogSourceDataCollection.

public void Clear()

Contains(LogSourceData)

Determines whether the LogSourceDataCollection contains the specified LogSourceData item.

public bool Contains(LogSourceData item)

Parameters

item LogSourceData

The LogSourceData object to check for.

Returns

bool

true if the LogSourceDataCollection contains the specified element; otherwise, false.

CopyTo(LogSourceData[], int)

Copies the LogSourceDataCollection elements to an existing one-dimensional System.Array, starting at the specified array index.

public void CopyTo(LogSourceData[] array, int arrayIndex)

Parameters

array LogSourceData[]

The one-dimensional LogSourceData[] array that is the destination of the elements copied from LogSourceDataCollection. The System.Array must have zero-based indexing.

arrayIndex int

The zero-based index in the array at which copying begins.

GetEnumerator()

Returns an enumerator that iterates through the LogSourceDataCollection.

public IEnumerator<LogSourceData> GetEnumerator()

Returns

IEnumerator<LogSourceData>

An enumerator that interates through the collection.

Remove(LogSourceData)

Removes all LogSourceData objects from the collection.

public bool Remove(LogSourceData item)

Parameters

item LogSourceData

Returns

bool