Show / Hide Table of Contents

Class Environment.Diagnostic

Class used to handle the Diagnostic field in the Model window. The bottom of the Model window in Experior has a bar showing the current status of Experior, showing if the model is paused, locked ect. The rightmost part of this bar is used as an alternative log that can convey information to the user. The bar can only show one message. The old message will be overwritten if a new message is sent. There is a number of Message methods, with varying degrees of customizability. The other methods are already configured with text colors that work with the themes that are available in Experior:

Information(String, Environment.DiagnosticAction)Used to convey general information.
Flash(String, Environment.DiagnosticAction)Used to convey general information.
Check(String, Environment.DiagnosticAction)Used to convey that some action completed.
Warning(String, Environment.DiagnosticAction)Used to convey a warning.
Forbidden(String, Environment.DiagnosticAction)Used to convey that something happens that shouldn't, is less severe than Error(String, Environment.DiagnosticAction).
Stop(String, Environment.DiagnosticAction)Used to convey that something happens that shouldn't, is less severe than Error(String, Environment.DiagnosticAction).
Error(String, Environment.DiagnosticAction)Used to convey an error.
Unknown(String, Environment.DiagnosticAction)Used to convey an unknown state. Generally because of an unrecognized input, that doesn't warrant an Error(String, Environment.DiagnosticAction) or Warning(String, Environment.DiagnosticAction).
Inheritance
System.Object
Environment.Diagnostic
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Experior.Core
Assembly: Experior.Core.dll
Syntax
public static class Diagnostic

Methods

Check(String, Environment.DiagnosticAction)

Used to convey that some action completed. Shows the message in the diagnostic bar in green with an icon with an check icon ✔️.

Declaration
public static void Check(string message, Environment.DiagnosticAction action = Environment.DiagnosticAction.TEMPORARYANDLOG)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

Behaviour of the message, by default the message will be shown temporarily in the Diagnostic bar and logged in the logging window.

Clear()

Clear the current message in the diagnostic bar,

Declaration
public static void Clear()

Error(String, Environment.DiagnosticAction)

Used to convey an error. Shows the message in the diagnostic bar in red with an icon with an error icon ❗.

Declaration
public static void Error(string message, Environment.DiagnosticAction action = Environment.DiagnosticAction.TEMPORARYANDLOG)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

Behaviour of the message, by default the message will be shown temporarily in the Diagnostic bar and logged in the logging window.

Flash(String, Environment.DiagnosticAction)

Used to convey general information. Shows the message in the diagnostic bar in teal with an flash icon ⚡.

Declaration
public static void Flash(string message, Environment.DiagnosticAction action = Environment.DiagnosticAction.TEMPORARYANDLOG)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

Behaviour of the message, by default the message will be shown temporarily in the Diagnostic bar and logged in the logging window.

Forbidden(String, Environment.DiagnosticAction)

Used to convey that something happens that shouldn't, is less severe than Error(String, Environment.DiagnosticAction). Shows the message in the diagnostic bar in red with an icon with an forbidden icon ⛔.

Declaration
public static void Forbidden(string message, Environment.DiagnosticAction action = Environment.DiagnosticAction.TEMPORARYANDLOG)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

Behaviour of the message, by default the message will be shown temporarily in the Diagnostic bar and logged in the logging window.

Information(String, Environment.DiagnosticAction)

Used to convey general information. Shows the message in the diagnostic bar in blue with an icon with an information icon ℹ️.

Declaration
public static void Information(string message, Environment.DiagnosticAction action = Environment.DiagnosticAction.TEMPORARYANDLOG)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

Behaviour of the message, by default the message will be shown temporarily in the Diagnostic bar and logged in the logging window.

Message(String)

Display a message temporarily in the diagnostic bar. The message will also be added to the log window. The message will not have an accompaniment icon, the text color will be determined by the the current Theme.

Declaration
public static void Message(string message)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Message(String, Environment.DiagnosticAction)

Display a message temporarily in the diagnostic bar. The message will not have an accompaniment icon, the text color will be determined by the the current Theme.

Declaration
public static void Message(string message, Environment.DiagnosticAction action)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

The behaviour of the message.

Message(String, String)

Display a message in the diagnostic bar. The message will not have an accompaniment icon.

Declaration
public static void Message(string sender, string message)
Parameters
Type Name Description
System.String sender

The origin of the message, if from an Assembly then this would normally be the name of the assembly that sent the message.

System.String message

Message to show in the diagnostic bar.

Message(String, String, Environment.DiagnosticAction)

Display a message in the diagnostic bar. The message will not have an accompaniment icon.

Declaration
public static void Message(string sender, string message, Environment.DiagnosticAction action)
Parameters
Type Name Description
System.String sender

The origin of the message, if from an Assembly then this would normally be the name of the assembly that sent the message.

System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

The behaviour of the message.

Message(String, String, Environment.DiagnosticAction, Environment.Signs, Nullable<Color>)

Display a message temporarily in the diagnostic bar.

Declaration
public static void Message(string sender, string message, Environment.DiagnosticAction action, Environment.Signs sign, Color? color = default(Color? ))
Parameters
Type Name Description
System.String sender

The origin of the message, if from an Assembly then this would normally be the name of the assembly that sent the message.

System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

Behaviour of the message, by default the message will be shown temporarily in the Diagnostic bar and logged in the logging window.

Environment.Signs sign

The icon in front of the message.

System.Nullable<System.Windows.Media.Color> color

The text color.

Message(String, String, Color)

Display a message in the diagnostic bar. The message will not have an accompaniment icon.

Declaration
public static void Message(string sender, string message, Color color)
Parameters
Type Name Description
System.String sender

The origin of the message, if from an Assembly then this would normally be the name of the assembly that sent the message.

System.String message

Message to show in the diagnostic bar.

System.Windows.Media.Color color

The text color.

Message(String, Color)

Display a message temporarily in the diagnostic bar. The message will also be added to the log window. The message will not have an accompaniment icon.

Declaration
public static void Message(string message, Color color)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

System.Windows.Media.Color color

The text color.

Message(String, Color, Environment.DiagnosticAction)

Display a message in the diagnostic bar. The message will not have an accompaniment icon.

Declaration
public static void Message(string message, Color color, Environment.DiagnosticAction action)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

System.Windows.Media.Color color

The text color.

Environment.DiagnosticAction action

The behaviour of the message.

Message(String, Color, Environment.DiagnosticAction, Environment.Signs)

Display a message in the diagnostic bar.

Declaration
public static void Message(string message, Color color, Environment.DiagnosticAction action, Environment.Signs sign)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

System.Windows.Media.Color color

The text color.

Environment.DiagnosticAction action

The behaviour of the message.

Environment.Signs sign

The icon in front of the message

Stop(String, Environment.DiagnosticAction)

Used to convey that something happens that shouldn't, is less severe than Error(String, Environment.DiagnosticAction). Shows the message in the diagnostic bar in red with an icon with an stop icon 🚫.

Declaration
public static void Stop(string message, Environment.DiagnosticAction action = Environment.DiagnosticAction.TEMPORARYANDLOG)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

Behaviour of the message, by default the message will be shown temporarily in the Diagnostic bar and logged in the logging window.

Unknown(String, Environment.DiagnosticAction)

Used to convey an unknown state. Generally because of an unrecognized input, that doesn't warrant an Error(String, Environment.DiagnosticAction) or Warning(String, Environment.DiagnosticAction).. Shows the message in the diagnostic bar in teal with an icon with an unknown icon ❓.

Declaration
public static void Unknown(string message, Environment.DiagnosticAction action = Environment.DiagnosticAction.TEMPORARYANDLOG)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

Behaviour of the message, by default the message will be shown temporarily in the Diagnostic bar and logged in the logging window.

Warning(String, Environment.DiagnosticAction)

Used to convey a warning. Shows the message in the diagnostic bar in orange with an icon with an warning icon ⚠️.

Declaration
public static void Warning(string message, Environment.DiagnosticAction action = Environment.DiagnosticAction.TEMPORARYANDLOG)
Parameters
Type Name Description
System.String message

Message to show in the diagnostic bar.

Environment.DiagnosticAction action

Behaviour of the message, by default the message will be shown temporarily in the Diagnostic bar and logged in the logging window.

Back to top Generated by DocFX