Class MessageSinkMessage
- Namespace
- Xunit.Runner.Common
- Assembly
- xunit.v3.runner.common.dll
Default implementation of IMessageSinkMessage, with serialization and deserialization support.
public abstract class MessageSinkMessage : IJsonDeserializable, IMessageSinkMessage, IJsonSerializable
- Inheritance
-
MessageSinkMessage
- Implements
- Derived
- Inherited Members
- Extension Methods
-
Xunit.Sdk.MessageSinkMessageExtensions.DispatchWhen``1(Xunit.Sdk.IMessageSinkMessage,Xunit.Runner.Common.MessageHandler{``0})
Remarks
Because of deserialization, all concrete message sink message types must have a parameterless public constructor that will be used to create the message for deserialization purposes, and must be decorated with JsonTypeIDAttribute to set a unique type ID for deserialization purposes.
Constructors
- MessageSinkMessage()
Initializes a new instance of the see MessageSinkMessage class.
Fields
- EmptyTraits
Empty traits, to be used to initialize traits values in messages.
- UnsetStringPropertyValue
Gets the string value that message properties will return, when a value was not provided during deserialization.
Methods
- Deserialize(IReadOnlyDictionary<string, object?>)
Override to deserialize the values in the dictionary into the message.
- FromJson(IReadOnlyDictionary<string, object?>)
Deserializes the object's values from the provided JSON.
- Serialize(JsonObjectSerializer)
Override to serialize the values in the message into JSON.
- ToDisplayString(string?[]?)
Converts a string array into a display value, for use in an ToString() overload.
- ToDisplayString<T>(T[]?)
Converts am array into a display value, for use in an ToString() overload.
- ToJson()
Creates a JSON serialized version of this message.