Table of Contents

Class ExceptionMessage

Namespace
Loehnert.Lisrt.Messaging.Exceptions
Assembly
Loehnert.Lisrt.dll

A message class for an Exception.

public class ExceptionMessage : MessageBase, INotifyPropertyChangedEx, INotifyPropertyChanged, IMessage, ITranslatableText
Inheritance
PropertyChangedBase
ExceptionMessage
Implements
INotifyPropertyChangedEx
Inherited Members
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Constructors

ExceptionMessage(Exception, ILisrtModule, LogLevel)

Initializes a new instance of the ExceptionMessage class.

public ExceptionMessage(Exception ex, ILisrtModule module = null, LogLevel level = LogLevel.Error)

Parameters

ex Exception

Exception for the message.

module ILisrtModule

Origin module of the exception.

level LogLevel

Log level.

Properties

Ex

Gets the exception.

public Exception Ex { get; }

Property Value

Exception

ID

Gets the ID if the exception has IHasMessageNumber implemented, otherwise null.

public override int? ID { get; }

Property Value

int?

Level

Gets Error.

public override LogLevel Level { get; }

Property Value

LogLevel

Module

Gets the origin module.

public override ILisrtModule Module { get; }

Property Value

ILisrtModule

Text

Gets the message from the exception.

public override string Text { get; }

Property Value

string

Methods

Translate(CultureInfo)

Gets the translated message text, if Ex has ITranslatableText is implemented. Otherwise Message will be returned.

public override string Translate(CultureInfo culture)

Parameters

culture CultureInfo

Culture for the returning message.

Returns

string

a translated message CultureInfo if available.