TraceEventCollection.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.