Class DiagnosticMessage
Default implementation of IDiagnosticMessage.
[JsonTypeID("diagnostic")]
public sealed class DiagnosticMessage : MessageSinkMessage, IJsonDeserializable, IDiagnosticMessage, IMessageSinkMessage, IJsonSerializable
- Inheritance
-
DiagnosticMessage
- Implements
- Inherited Members
- Extension Methods
Constructors
DiagnosticMessage()
Creates a new instance of the DiagnosticMessage class.
public DiagnosticMessage()
DiagnosticMessage(string)
Creates a new instance of the DiagnosticMessage class with the provided message.
public DiagnosticMessage(string message)
Parameters
messagestringThe diagnostic message
DiagnosticMessage(string, object?)
Creates a new instance of the DiagnosticMessage class with the provided message format and single argument.
public DiagnosticMessage(string messageFormat, object? arg0)
Parameters
messageFormatstringThe message format string
arg0objectThe value to replace {0} in the format string.
DiagnosticMessage(string, object?, object?)
Creates a new instance of the DiagnosticMessage class with the provided message format and two arguments.
public DiagnosticMessage(string messageFormat, object? arg0, object? arg1)
Parameters
messageFormatstringThe message format string
arg0objectThe value to replace {0} in the format string.
arg1objectThe value to replace {1} in the format string.
DiagnosticMessage(string, object?, object?, object?)
Creates a new instance of the DiagnosticMessage class with the provided message format and three arguments.
public DiagnosticMessage(string messageFormat, object? arg0, object? arg1, object? arg2)
Parameters
messageFormatstringThe message format string
arg0objectThe value to replace {0} in the format string.
arg1objectThe value to replace {1} in the format string.
arg2objectThe value to replace {2} in the format string.
DiagnosticMessage(string, params object?[])
Creates a new instance of the DiagnosticMessage class with the provided message format and multiple arguments.
public DiagnosticMessage(string messageFormat, params object?[] args)
Parameters
messageFormatstringThe message format string
argsobject[]An object array that contains zero or more objects to format.
Properties
Message
Gets the diagnostic message.
public required string Message { get; set; }
Property Value
Remarks
Note: Will be UnsetStringPropertyValue if there was no value provided during deserialization.
Methods
Deserialize(IReadOnlyDictionary<string, object?>)
Override to deserialize the values in the dictionary into the message.
protected override void Deserialize(IReadOnlyDictionary<string, object?> root)
Parameters
rootIReadOnlyDictionary<string, object>The root of the JSON object
Serialize(JsonObjectSerializer)
Override to serialize the values in the message into JSON.
protected override void Serialize(JsonObjectSerializer serializer)
Parameters
serializerJsonObjectSerializerThe serializer to write values to.
ToString()
public override string ToString()