C# Класс 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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

CloseLogFile() публичный Метод

Close the log file and remove the corresponding listener.
public CloseLogFile ( ) : void
Результат void

LogManager() публичный Метод

Constructor without argument.
public LogManager ( ) : System
Результат System

TrackEvent() публичный Метод

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.
Результат void

WriteLogFile() публичный Метод

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.
Результат void