C# 클래스 ObjectPrinter.ExceptionExtensions

Extensions for exceptions
파일 보기 프로젝트 열기: drewburlingame/ObjectPrinter

공개 메소드들

메소드 설명
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