C# Класс ObjectPrinter.ExceptionExtensions

Extensions for exceptions
Показать файл Открыть проект

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

Метод Описание
SetContext ( this e, string name, object context, bool ifNotSerializablePrintOnSerialize = true ) : void

Adds context in the form of objects to the Data property of an exception. This context will be printed with the exception.

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

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

Adds context in the form of objects to the Data property of an exception. This context will be printed with the exception.
public static SetContext ( this e, string name, object context, bool ifNotSerializablePrintOnSerialize = true ) : void
e this The exception to add context to
name string The name to describe the context
context object The context item.
ifNotSerializablePrintOnSerialize bool /// When true, if the object is not serializable, the object will be dumped /// to string and added to the exception before serialization. default=true ///
Результат void