Table of Contents

Class SimpleMessage

Namespace
Hi.Common.Messages
Assembly
HiGeom.dll

A plain IMessage with no anchor: severity, category, id, notification text and optional detail. This is the default carrier for ad-hoc messages that have no other home. When step context is available, a step-anchored decorator wraps a SimpleMessage to add the StepIndex / SentenceCarrier without the producer needing to know it.

public class SimpleMessage : IMessage
Inheritance
SimpleMessage
Implements
Inherited Members
Extension Methods

Constructors

SimpleMessage(Severity, string, Category, string, object)

Initializes a new instance of the SimpleMessage class.

public SimpleMessage(Severity severity, string notification, Category category = Category.System, string id = null, object detail = null)

Parameters

severity Severity

Importance level.

notification string

End-user friendly notification text.

category Category

Classification; defaults to System.

id string

Optional structured id.

detail object

Optional detail payload or exception.

Properties

Category

Gets the classification.

public Category Category { get; }

Property Value

Category

Detail

Gets the optional detail payload or exception; null when not applicable.

public object Detail { get; }

Property Value

object

Id

Gets the structured id for filtering / suppression; may be null.

public string Id { get; }

Property Value

string

Notification

Gets the end-user friendly notification text.

public string Notification { get; }

Property Value

string

Severity

Gets the importance level.

public Severity Severity { get; }

Property Value

Severity

Methods

GetCategory()

Gets the classification — see Category.

public Category GetCategory()

Returns

Category

The category of this message.

GetDetail()

Gets the optional detail payload or exception; null when not applicable.

public object GetDetail()

Returns

object

The detail object, or null.

GetId()

Gets the structured id used for filtering / suppression; may be null.

public string GetId()

Returns

string

The message id, or null when not applicable.

GetNotification()

Gets the end-user friendly notification text.

public string GetNotification()

Returns

string

The notification text.

GetSeverity()

Gets the importance level — see Severity.

public Severity GetSeverity()

Returns

Severity

The severity of this message.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.