C# Класс Tickster.Utils.ExceptionSignatureBuilder

Generates exception signatures useful for grouping exceptions together. The signatures are also useful when you wan't to give users an identifier or "error-code" to use when they contact customer service. Use the ToString method to produce small friendly signatures (example: 7815696e). Produces upper case codes by default (controlled by the UseUpperCaseSignature property).
Наследование: IDisposable
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
AppendErrorCode void
AppendExceptionMessage void
AppendMethodInfo string
AppendPreprocessedMessage void
AppendStackTrace void
AssertNotDisposed void
GetParameterStrings string[]
RemoveTextWithinStopChars string

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

Метод Описание
AddException ( Exception exception ) : void

Add one exception to the builder and traverse all its inner exceptions

AddException ( Exception exception, bool traverseInnerException ) : void

Add one exception to the builder optionally traversing all of its inner exceptions

Clear ( ) : void

Removes all signature data from the builder

Dispose ( ) : void
ExceptionSignatureBuilder ( ) : System

Initializes a new instance of the ExceptionSignatureBuilder class.

GetSignatureBytes ( ) : byte[]

Returns the signature hash (128bit md5)

ToSignatureHashDigest ( ) : string

Returns a 32 characters long hex digest of the signature bytes

ToSignatureString ( ) : string

Computes a 8-character long exception signature taken from the beginning of the exception signature hash digest (ToSignatureHashDigest)

ToString ( ) : string

Computes a 8-character long exception signature taken from the beginning of the exception signature hash digest (ToSignatureHashDigest)

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

Метод Описание
AppendErrorCode ( int errorCode ) : void
AppendExceptionMessage ( Exception exception ) : void
AppendMethodInfo ( MethodBase mb ) : string
AppendPreprocessedMessage ( StringBuilder sb, string message ) : void
AppendStackTrace ( Exception exception ) : void
AssertNotDisposed ( ) : void
GetParameterStrings ( ParameterInfo parameterInfo ) : string[]
RemoveTextWithinStopChars ( string value ) : string

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

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

Add one exception to the builder and traverse all its inner exceptions
public AddException ( Exception exception ) : void
exception System.Exception The exception to add
Результат void

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

Add one exception to the builder optionally traversing all of its inner exceptions
public AddException ( Exception exception, bool traverseInnerException ) : void
exception System.Exception The exception to add
traverseInnerException bool Whether or not to include all inner exceptions in the signature
Результат void

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

Removes all signature data from the builder
public Clear ( ) : void
Результат void

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

public Dispose ( ) : void
Результат void

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

Initializes a new instance of the ExceptionSignatureBuilder class.
public ExceptionSignatureBuilder ( ) : System
Результат System

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

Returns the signature hash (128bit md5)
public GetSignatureBytes ( ) : byte[]
Результат byte[]

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

Returns a 32 characters long hex digest of the signature bytes
public ToSignatureHashDigest ( ) : string
Результат string

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

Computes a 8-character long exception signature taken from the beginning of the exception signature hash digest (ToSignatureHashDigest)
public ToSignatureString ( ) : string
Результат string

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

Computes a 8-character long exception signature taken from the beginning of the exception signature hash digest (ToSignatureHashDigest)
public ToString ( ) : string
Результат string