Table of Contents

Class EX

Namespace
Tlabs
Assembly
Tlabs.Core.dll

Helper Exception extension to manage message template data.

public static class EX
Inheritance
EX
Inherited Members

Methods

MsgTemplate<T>(T)

Returns this excption's template message or null if not present.

public static string? MsgTemplate<T>(this T ex) where T : Exception

Parameters

ex T

Returns

string

Type Parameters

T

New<T>(Exception, string, params object[])

New exception T from innerException and template data.

public static T New<T>(Exception innerException, string msgTemplate, params object[] args) where T : Exception

Parameters

innerException Exception
msgTemplate string
args object[]

Returns

T

Type Parameters

T

New<T>(string, params object[])

New exception T with template data.

public static T New<T>(string msgTemplate, params object[] args) where T : Exception

Parameters

msgTemplate string
args object[]

Returns

T

Type Parameters

T

ResolvedMsgTemplate<T>(T)

Resolved message template.

public static string ResolvedMsgTemplate<T>(this T ex) where T : Exception

Parameters

ex T

Returns

string

Type Parameters

T

SetMissingTemplateData<T>(T, string, params object[])

Set missing template (message) data.

public static T SetMissingTemplateData<T>(this T ex, string msgTemplate, params object[] args) where T : Exception

Parameters

ex T
msgTemplate string
args object[]

Returns

T

Type Parameters

T

SetMsgData<T>(T, IDictionary)

Set message data.

public static T SetMsgData<T>(this T ex, IDictionary data) where T : Exception

Parameters

ex T
data IDictionary

Returns

T

Type Parameters

T

SetMsgData<T>(T, string, object)

Set message data.

public static T SetMsgData<T>(this T ex, string key, object data) where T : Exception

Parameters

ex T
key string
data object

Returns

T

Type Parameters

T

SetTemplateData<T>(T, string, params object[])

Set template (message) data.

public static T SetTemplateData<T>(this T ex, string msgTemplate, params object[] args) where T : Exception

Parameters

ex T
msgTemplate string
args object[]

Returns

T

Type Parameters

T

TemplateData<T>(T)

Template data or null.

public static IDictionary<string, object?>? TemplateData<T>(this T ex) where T : Exception

Parameters

ex T

Returns

IDictionary<string, object>

Type Parameters

T