C# Class Revit.SDK.Samples.EventsMonitor.CS.LogManager

This class implements all operators about writing log file and generating event information for showing in the information window. This class is not the main one just a assistant in this sample. If you just want to learn how to use Revit events, please pay more attention to EventManager class.
Mostrar archivo Open project: AMEE/revit

Public Methods

Method Description
CloseLogFile ( ) : void

Close the log file and remove the corresponding listener.

LogManager ( ) : System

Constructor without argument.

TrackEvent ( Object sender, EventArgs args ) : void

When any event which has been subscribed is fired, log its information. the information includes: machine name, user, time and event

WriteLogFile ( Object sender, EventArgs args ) : void

Write log to file, event name and type will be dumped

Private Methods

Method Description
CreateEventsLogTable ( ) : DataTable

Generate a data table with four columns for display in window

CreateLogFile ( ) : void

Create a log file to track the subscribed events' work process.

GetEventsName ( Type type ) : String

Get event name from its EventArgs, without namespace prefix

Method Details

CloseLogFile() public method

Close the log file and remove the corresponding listener.
public CloseLogFile ( ) : void
return void

LogManager() public method

Constructor without argument.
public LogManager ( ) : System
return System

TrackEvent() public method

When any event which has been subscribed is fired, log its information. the information includes: machine name, user, time and event
public TrackEvent ( Object sender, EventArgs args ) : void
sender Object Event sender.
args System.EventArgs EventArgs of this event.
return void

WriteLogFile() public method

Write log to file, event name and type will be dumped
public WriteLogFile ( Object sender, EventArgs args ) : void
sender Object Event sender.
args System.EventArgs EventArgs of this event.
return void