C# Класс CK.Core.CKExceptionData

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CurrentStreamVersion int

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

Метод Описание
CKExceptionData ( CKBinaryReader r, bool streamIsCRLF ) : System

Initializes a new CKExceptionData from a CKBinaryReader. See Write(CKBinaryWriter,bool).

CKExceptionData ( CKBinaryReader r, bool streamIsCRLF, int version ) : System

Initializes a new CKExceptionData from a CKBinaryReader with a known version. See Write(CKBinaryWriter,bool).

CKExceptionData ( string message, string exceptionTypeName, string exceptionTypeAssemblyQualifiedName, string stackTrace, CKExceptionData innerException, string fileName, string detailedInfo, CKExceptionData loaderExceptions, CKExceptionData aggregatedExceptions ) : System

Initializes a new CKExceptionData with all its fields. Use the factory method CreateFrom to create a data from any exception.

CreateFrom ( Exception ex ) : CKExceptionData

Creates a CKExceptionData from any Exception.

ToString ( ) : string

Overridden to return a detailed text. This string is cached once built.

ToStringBuilder ( StringBuilder b, string prefix ) : void

Writes the exception data as a readable block of text into a StringBuilder.

ToTextWriter ( TextWriter w, string prefix ) : void

Writes the exception data as a readable block of text into a TextWriter.

Write ( CKBinaryWriter w, bool writeVersion = true ) : void

Writes this exception data into a BinaryWriter.

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

Метод Описание
AppendField ( StringBuilder b, string prefix, string label, string text ) : StringBuilder
WriteWithoutVersion ( CKBinaryWriter w ) : void

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

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

Initializes a new CKExceptionData from a CKBinaryReader. See Write(CKBinaryWriter,bool).
public CKExceptionData ( CKBinaryReader r, bool streamIsCRLF ) : System
r CKBinaryReader The reader to read from.
streamIsCRLF bool Whether the strings have CRLF or LF for end-of-lines.
Результат System

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

Initializes a new CKExceptionData from a CKBinaryReader with a known version. See Write(CKBinaryWriter,bool).
public CKExceptionData ( CKBinaryReader r, bool streamIsCRLF, int version ) : System
r CKBinaryReader The reader to read from.
streamIsCRLF bool Whether the strings have CRLF or LF for end-of-lines.
version int Known version.
Результат System

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

Initializes a new CKExceptionData with all its fields. Use the factory method CreateFrom to create a data from any exception.
public CKExceptionData ( string message, string exceptionTypeName, string exceptionTypeAssemblyQualifiedName, string stackTrace, CKExceptionData innerException, string fileName, string detailedInfo, CKExceptionData loaderExceptions, CKExceptionData aggregatedExceptions ) : System
message string Message of the exception. Must not be null.
exceptionTypeName string Type name of the exception (no namespace nor assembly). Must not be null nor empty..
exceptionTypeAssemblyQualifiedName string Full type name of the exception. Must not be null nor empty.
stackTrace string Stack trace. Can be null.
innerException CKExceptionData Inner exception. If is not null, it must be the same as the first aggregated exceptions.
fileName string File name related to the exception (if it makes sense). Can be null.
detailedInfo string More detailed information if any.
loaderExceptions CKExceptionData Loader exceptions. .
aggregatedExceptions CKExceptionData Aggregated exceptions can be null. Otherwise, it must contain at least one exception.
Результат System

CreateFrom() статический публичный Метод

Creates a CKExceptionData from any Exception.
static public CreateFrom ( Exception ex ) : CKExceptionData
ex System.Exception Exception for which data must be created. Can be null: null is returned.
Результат CKExceptionData

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

Overridden to return a detailed text. This string is cached once built.
public ToString ( ) : string
Результат string

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

Writes the exception data as a readable block of text into a StringBuilder.
public ToStringBuilder ( StringBuilder b, string prefix ) : void
b StringBuilder The StringBuilder to write to.
prefix string Prefix that will appear at the start of each line.
Результат void

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

Writes the exception data as a readable block of text into a TextWriter.
public ToTextWriter ( TextWriter w, string prefix ) : void
w System.IO.TextWriter The TextWriter to write to.
prefix string Prefix that will appear at the start of each line.
Результат void

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

Writes this exception data into a BinaryWriter.
public Write ( CKBinaryWriter w, bool writeVersion = true ) : void
w CKBinaryWriter The writer to use. Can not be null.
writeVersion bool False to not write the .
Результат void

Описание свойств

CurrentStreamVersion публичное статическое свойство

The current stream version.
public static int CurrentStreamVersion
Результат int