Message

References
[IoId("00000000-5c9b-4a8f-813c-468ba16d9f27")] public sealed class Message : IComparable<Message>, IEquatable<Message>, IStorable
A message associated with an IDocumentObject, typically generated during solutions.

Constructors

Message

#
public Message(IReader reader)
reader (IReader)

Properties

ActionCount

#
public int ActionCount { get; }
Gets the number of actions in this message.

Actions

#
public IEnumerable<MessageAction> Actions { get; }
Gets the action to invoke (if any) when this message is triggered by the user.

Info

#
public string Info { get; }
Gets the in-depth explanation of this message. This may contain several sentences, including definitions of words.

Level

#
public MessageLevel Level { get; }
Gets the level of this message.

Text

#
public string Text { get; }
Gets the text of this message. This is ideally a single sentence containing not too many words.

Valence

#
public int Valence { get; set; }
Gets or sets the valence of this message. This is typically assigned automatically when similar messages are merged, you do not have to assign the valence yourself.

Methods

CompareTo

#
public int CompareTo(Message other)
other (Message)

Equals

#
public bool Equals(Message other)
other (Message)

Equals

#
public override bool Equals(object obj)
obj (object)
Object.Equals

Error

#
public static Message Error(string text, string info, params MessageAction[] actions)
Create an error which automatically expires each solution.
text (string)
info (string)
actions (params MessageAction[])

Error

#
public static Message Error(string text, string info, params MessageDelegate[] delegates)
Create an error which automatically expires each solution.
text (string)
info (string)
delegates (params MessageDelegate[])

Error

#
public static Message Error(string text, string info)
Create an error which automatically expires each solution.
text (string)
info (string)

GetHashCode

#
public override int GetHashCode()

Remark

#
public static Message Remark(string text, string info, params MessageAction[] actions)
Create a remark which automatically expires each solution.
text (string)
info (string)
actions (params MessageAction[])

Store

#
public void Store(IWriter writer)
writer (IWriter)
Store

ToString

#
public override string ToString()
Object.ToString

Warning

#
public static Message Warning(string text, string info, params MessageAction[] actions)
Create a warning which automatically expires each solution.
text (string)
info (string)
actions (params MessageAction[])

WithActions

#
public Message WithActions(params MessageAction[] actions)
Add actions to this message.
actions (params MessageAction[])

WithoutActions

#
public Message WithoutActions()
Remove all actions from this message.

WithText

#
public Message WithText(string newText)
Replace the text of this message. This is typically used to prepend or append additional information.
newText (string)