C# 클래스 GSF.IO.RunTimeLog

Represents a persisted run-time log that tracks last start, stop and running times.
상속: ISupportLifecycle, IProvideStatus
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf 1 사용 예제들

Private Properties

프로퍼티 타입 설명
m_flushTimer_Elapsed void

공개 메소드들

메소드 설명
Dispose ( ) : void

Releases all the resources used by the RunTimeLog object.

Initialize ( ) : void

Initialize the run-time log.

Initialization performs initial run-time log read, establishes new start time and enables automatic write log timer.

Last logged stop time will be validated against last logged running time. If the last logged running time is later than the last logged stop time, the stop time will be set to the running time with the assumption that the log file was not properly shut down (e.g., due to abnormal host termination).

It is important to separate initialization from construction such that consumer can attach to events before class is initialized in case initialization causes events to be raised.

RunTimeLog ( ) : System

Creates a new run-time log.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the RunTimeLog object and optionally releases the managed resources.

OnProcessException ( Exception ex ) : void

Raises ProcessException event.

ReadLog ( ) : void

Reads the run-time log.

WriteLog ( ) : void

Writes the run-time log - times are in a human readable format.

비공개 메소드들

메소드 설명
m_flushTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

메소드 상세

Dispose() 공개 메소드

Releases all the resources used by the RunTimeLog object.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases the unmanaged resources used by the RunTimeLog object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

Initialize() 공개 메소드

Initialize the run-time log.

Initialization performs initial run-time log read, establishes new start time and enables automatic write log timer.

Last logged stop time will be validated against last logged running time. If the last logged running time is later than the last logged stop time, the stop time will be set to the running time with the assumption that the log file was not properly shut down (e.g., due to abnormal host termination).

It is important to separate initialization from construction such that consumer can attach to events before class is initialized in case initialization causes events to be raised.

public Initialize ( ) : void
리턴 void

OnProcessException() 보호된 메소드

Raises ProcessException event.
protected OnProcessException ( Exception ex ) : void
ex System.Exception Processing .
리턴 void

ReadLog() 보호된 메소드

Reads the run-time log.
protected ReadLog ( ) : void
리턴 void

RunTimeLog() 공개 메소드

Creates a new run-time log.
public RunTimeLog ( ) : System
리턴 System

WriteLog() 보호된 메소드

Writes the run-time log - times are in a human readable format.
protected WriteLog ( ) : void
리턴 void