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
-
PropertyChangedBaseExceptionMessage
- Implements
-
INotifyPropertyChangedEx
- Inherited Members
-
PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.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
ExceptionException for the message.
module
ILisrtModuleOrigin module of the exception.
level
LogLevelLog level.
Properties
Ex
Gets the exception.
public Exception Ex { get; }
Property Value
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
Module
Gets the origin module.
public override ILisrtModule Module { get; }
Property Value
Text
Gets the message from the exception.
public override string Text { get; }
Property Value
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
CultureInfoCulture for the returning message.
Returns
- string
a translated message CultureInfo if available.