.NET Event Tracing Class Library  

EventTraceSessionCollection Class

Represents collections of currently active event tracing sessions. The information is retrieved through the event tracing API, QueryAllTraces. The objects in this collection are of the EventTraceSession type.

For a list of all members of this type, see EventTraceSessionCollection Members.

System.Object
    WmiSolutions.EventTracing.Controller.EventTraceSessionCollection

[Visual Basic]
Public Class EventTraceSessionCollection 
    Inherits Object 
    Implements ICollection 
    Implements IEnumerable
[C#]
public class EventTraceSessionCollection : 
    Object, 
    ICollection, 
    IEnumerable
[C++]
public __gc class EventTraceSessionCollection : 
    public Object,
    public ICollection,
    public IEnumerable

Example

[C#]
    using System;
    using WmiSolutions.EventTracing;
    using WmiSolutions.EventTracing.Controller;

    EventTraceSessionCollection etsCollection = 
        EventTraceSession.ActiveSessions;

    foreach( EventTraceSession ets in etsCollection )
    {
        Console.WriteLine( "\n{0} - {1}", ets.LoggerName, 
            ets.LogFilePath);
        Console.WriteLine( "\t*NEW: Provider Name '{0}'", 
            ets.ProviderName);
        Console.WriteLine( "\t*NEW: Provider Description '{0}'", 
            ets.ProviderDescription);
    }
    
[Visual Basic]
    Imports System
    Imports WmiSolutions.EventTracing
    Imports WmiSolutions.EventTracing.Controller
 
    EventTraceSessionCollection etsCollection = 
        EventTraceSession.ActiveSessions

    Dim ets As EventTraceSession
    For Each ets In etsCollection
        Console.WriteLine("{0} - {1}", ets.LoggerName, 
            ets.LogFilePath)
        Console.WriteLine("*NEW: Provider Name '{0}'", 
            ets.ProviderName)
        Console.WriteLine("*NEW: Provider Description '{0}'", 
            ets.ProviderDescription)
    Next
    

Requirements

Namespace: WmiSolutions.EventTracing.Controller

Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: WmiSolutions.EventTracing.Controller (in WmiSolutions.EventTracing.dll)

 

See Also

EventTraceSessionCollection Members | EventTraceSession Members | EventTraceRegisteredProvider Members | EventTraceProviderCollection Members | EventTraceProvider Members | EventTraceKernelSession Members

Contact Me   |  Developing WMI Solutions    |   Gwyn Cole's Developer Blog    |   Legal
 © 2003 Content by Gwyn Cole. All rights reserved.