Multiprocotol Terminalprogram (BAT)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MultiTerm/Common/Messaging/GenericUserInterfaceMessage.cs

31 lines
862 B

namespace Common.Messaging;
public class GenericUserInterfaceMessage : IUserInterfaceMessage
{
/// <summary>
/// Description of the Message. Containes messsage text.
/// </summary>
public string Message { get; private set; }
/// <summary>
/// Importance of this message.
/// </summary>
public MessageImportance Importance { get; private set; }
public GenericUserInterfaceMessage(string message, MessageImportance importance)
{
// throw when message is empty
if (string.IsNullOrEmpty(message))
{
throw new NotImplementedException($"Please provide a valid message for the {nameof(GenericUserInterfaceMessage)}");
}
this.Message = message;
this.Importance = importance;
}
public override string ToString()
{
return this.Message;
}
}