C# 클래스 Endjin.Assembly.ChangeDetection.Infrastructure.Tracer

High performance tracer class which enables method enter/leave tracing with duration and other features.
파일 보기 프로젝트 열기: endjin/Endjin.Assembly.ChangeDetection 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ClearEvents void
FormatDuration string
FormatStringSafe string
FormatTime string
GenerateTypeMethodName string
Instrument void
Instrument void
Instrument void
TraceMsg void

공개 메소드들

메소드 설명
Dispose ( ) : void

Generate a leaving method trace. Normally called at the end of an using statement.

When the method is left with an exception and Exception tracing is enabled it will trace this exception.

Error ( Exception ex ) : void

Write an exception to the configured output device.

Error ( Exception ex, string fmt ) : void

Write an exception to the configured output device.

Error ( Level level, Exception ex ) : void

Write an exception to the configured output device.

Error ( Level level, Exception ex, string fmt ) : void

Write an exception to the configured output device.

Error ( Level level, TypeHashes type, string method, Exception ex ) : void

Write an exception to the configured output device.

Error ( Level level, TypeHashes type, string method, Exception ex, string fmt ) : void

Write an exception to the configured output device.

Error ( Level level, TypeHashes type, string method, string fmt ) : void

Write an error trace to the configured output device.

Error ( Level level, string fmt ) : void

Write an error trace to the configured output device.

Error ( string fmt ) : void

Write an error trace to the configured output device.

ErrorExecute ( System.Action action ) : bool

Execute the given callback when the current trace level and error severit filter let it pass.

Execute ( MessageTypes msgType, Level level, TypeHashes type, System.Action action ) : bool

Executes the callback when the given trace level is enabled. That allows when tracing is enabled complex string formatting only when needed.

Info ( Level level, TypeHashes type, string method, string fmt ) : void

Trace an info message with a given level.

Info ( Level level, string fmt ) : void

Trace an info message.

Info ( string fmt ) : void

Trace an info message with the trace level used during construction of the Tracer instance. If none default is Level 1.

InfoExecute ( System.Action action ) : bool

Execute the given callback when the current trace level and info severity filter let it pass.

Tracer ( Level level, TypeHashes type, string method ) : System

Create a new Tracer which traces method enter and leave (on Dispose)

Tracer ( TypeHashes type, string method ) : System

Create a new Tracer which traces method enter and leave (on Dispose)

Warning ( Level level, TypeHashes type, string method, string fmt ) : void

Write a warning trace to the configured output device.

Warning ( Level level, string fmt ) : void

Write a warning trace to the configured output device.

Warning ( string fmt ) : void

Write a warning trace to the configured output device.

WarningExecute ( System.Action action ) : bool

Execute the given callback when the current trace level and warning severity filter let it pass.

비공개 메소드들

메소드 설명
ClearEvents ( ) : void
FormatDuration ( long duration ) : string
FormatStringSafe ( string fmt ) : string
FormatTime ( System.DateTime time ) : string
GenerateTypeMethodName ( TypeHashes type, string method ) : string
Instrument ( Level level, TypeHashes type, string method, string fmt ) : void
Instrument ( Level level, string fmt ) : void
Instrument ( string fmt ) : void
TraceMsg ( string msgTypeString, string typeMethodName, System.DateTime time, string fmt ) : void

메소드 상세

Dispose() 공개 메소드

Generate a leaving method trace. Normally called at the end of an using statement.
When the method is left with an exception and Exception tracing is enabled it will trace this exception.
public Dispose ( ) : void
리턴 void

Error() 공개 메소드

Write an exception to the configured output device.
public Error ( Exception ex ) : void
ex System.Exception The exception to trace.
리턴 void

Error() 공개 메소드

Write an exception to the configured output device.
public Error ( Exception ex, string fmt ) : void
ex System.Exception The exception to trace.
fmt string Message describing what the exception is about.
리턴 void

Error() 공개 메소드

Write an exception to the configured output device.
public Error ( Level level, Exception ex ) : void
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
ex System.Exception The exception to trace.
리턴 void

Error() 공개 메소드

Write an exception to the configured output device.
public Error ( Level level, Exception ex, string fmt ) : void
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
ex System.Exception The exception to trace.
fmt string Message describing what the exception is about.
리턴 void

Error() 공개 정적인 메소드

Write an exception to the configured output device.
public static Error ( Level level, TypeHashes type, string method, Exception ex ) : void
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
type TypeHashes /// TypeHandle instance which identifies your class type. This instance should be a static instance of /// your type. ///
method string The method name of your current method.
ex System.Exception The excepton to trace.
리턴 void

Error() 공개 정적인 메소드

Write an exception to the configured output device.
public static Error ( Level level, TypeHashes type, string method, Exception ex, string fmt ) : void
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
type TypeHashes /// TypeHandle instance which identifies your class type. This instance should be a static instance of /// your type. ///
method string The method name of your current method.
ex System.Exception The exception to trace.
fmt string Message describing what the exception is about.
리턴 void

Error() 공개 정적인 메소드

Write an error trace to the configured output device.
public static Error ( Level level, TypeHashes type, string method, string fmt ) : void
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
type TypeHashes /// TypeHandle instance which identifies your class type. This instance should be a static instance of /// your type. ///
method string The method name of your current method.
fmt string Trace message format string
리턴 void

Error() 공개 메소드

Write an error trace to the configured output device.
public Error ( Level level, string fmt ) : void
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
fmt string Trace message format string
리턴 void

Error() 공개 메소드

Write an error trace to the configured output device.
public Error ( string fmt ) : void
fmt string Trace message format string
리턴 void

ErrorExecute() 공개 메소드

Execute the given callback when the current trace level and error severit filter let it pass.
public ErrorExecute ( System.Action action ) : bool
action System.Action The action.
리턴 bool

Execute() 공개 정적인 메소드

Executes the callback when the given trace level is enabled. That allows when tracing is enabled complex string formatting only when needed.
public static Execute ( MessageTypes msgType, Level level, TypeHashes type, System.Action action ) : bool
msgType MessageTypes The message type which must match.
level Level The trace level which must match.
type TypeHashes TypeHandle of your class.
action System.Action The delegate to execute when it does match.
리턴 bool

Info() 공개 정적인 메소드

Trace an info message with a given level.
public static Info ( Level level, TypeHashes type, string method, string fmt ) : void
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
type TypeHashes /// TypeHandle instance which identifies your class type. This instance should be a static instance of /// your type. ///
method string The method name of your current method.
fmt string Trace message format string
리턴 void

Info() 공개 메소드

Trace an info message.
public Info ( Level level, string fmt ) : void
level Level Used Trace Level
fmt string Trace message format string
리턴 void

Info() 공개 메소드

Trace an info message with the trace level used during construction of the Tracer instance. If none default is Level 1.
public Info ( string fmt ) : void
fmt string Trace message format string
리턴 void

InfoExecute() 공개 메소드

Execute the given callback when the current trace level and info severity filter let it pass.
public InfoExecute ( System.Action action ) : bool
action System.Action The action.
리턴 bool

Tracer() 공개 메소드

Create a new Tracer which traces method enter and leave (on Dispose)
public Tracer ( Level level, TypeHashes type, string method ) : System
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
type TypeHashes /// TypeHandle instance which identifies your class type. This instance should be a static instance of /// your type. ///
method string The method name of your current method.
리턴 System

Tracer() 공개 메소드

Create a new Tracer which traces method enter and leave (on Dispose)
public Tracer ( TypeHashes type, string method ) : System
type TypeHashes /// TypeHandle instance which identifies your class type. This instance should be a static instance of /// your type. ///
method string The method name of your current method.
리턴 System

Warning() 공개 정적인 메소드

Write a warning trace to the configured output device.
public static Warning ( Level level, TypeHashes type, string method, string fmt ) : void
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
type TypeHashes /// TypeHandle instance which identifies your class type. This instance should be a static instance of /// your type. ///
method string The method name of your current method.
fmt string Trace message format string
리턴 void

Warning() 공개 메소드

Write a warning trace to the configured output device.
public Warning ( Level level, string fmt ) : void
level Level Trace Level. 1 is the high level overview, 5 is for high volume detailed traces.
fmt string Trace message format string
리턴 void

Warning() 공개 메소드

Write a warning trace to the configured output device.
public Warning ( string fmt ) : void
fmt string Trace message format string
리턴 void

WarningExecute() 공개 메소드

Execute the given callback when the current trace level and warning severity filter let it pass.
public WarningExecute ( System.Action action ) : bool
action System.Action The action.
리턴 bool