TraceEventCollection.Add Method

Definition

Overloads

Add(TraceEvent)

Adds the specified TraceEvent to the end of the collection.

Add(TraceEventClass)

Creates a new TraceEvent object using the specified EventId, adds it to the end of the collection and returns the new TraceEvent created.

Add(TraceEvent)

Adds the specified TraceEvent to the end of the collection.

public int Add (Microsoft.AnalysisServices.TraceEvent item);
member this.Add : Microsoft.AnalysisServices.TraceEvent -> int
Public Function Add (item As TraceEvent) As Integer

Parameters

item
TraceEvent

The TraceEvent to be added.

Returns

The zero-based index at which the TraceEvent has been added to the collection.

Exceptions

The specified items is a null reference (Nothing in Visual Basic).

Applies to

Add(TraceEventClass)

Creates a new TraceEvent object using the specified EventId, adds it to the end of the collection and returns the new TraceEvent created.

public Microsoft.AnalysisServices.TraceEvent Add (Microsoft.AnalysisServices.TraceEventClass eventId);
member this.Add : Microsoft.AnalysisServices.TraceEventClass -> Microsoft.AnalysisServices.TraceEvent
Public Function Add (eventId As TraceEventClass) As TraceEvent

Parameters

eventId
TraceEventClass

The EventId for the new TraceEvent object.

Returns

The newly created TraceEvent object.

Exceptions

An element with the specified EventID already exists in the collection.

Applies to