Table of Contents

Class InternalDiagnosticMessage

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

Default implementation of IInternalDiagnosticMessage.

[JsonTypeID("internal-diagnostic")]
public sealed class InternalDiagnosticMessage : MessageSinkMessage, IInternalDiagnosticMessage, IMessageSinkMessage, IJsonSerializable
Inheritance
InternalDiagnosticMessage
Implements
Inherited Members

Constructors

InternalDiagnosticMessage()

Creates a new instance of the InternalDiagnosticMessage class.

public InternalDiagnosticMessage()

InternalDiagnosticMessage(string)

Creates a new instance of the InternalDiagnosticMessage class with the provided message.

public InternalDiagnosticMessage(string message)

Parameters

message string

The diagnostic message

InternalDiagnosticMessage(string, object?)

Creates a new instance of the InternalDiagnosticMessage class with the provided message format and single argument.

public InternalDiagnosticMessage(string messageFormat, object? arg0)

Parameters

messageFormat string

The message format string

arg0 object

The value to replace {0} in the format string.

InternalDiagnosticMessage(string, object?, object?)

Creates a new instance of the InternalDiagnosticMessage class with the provided message format and two arguments.

public InternalDiagnosticMessage(string messageFormat, object? arg0, object? arg1)

Parameters

messageFormat string

The message format string

arg0 object

The value to replace {0} in the format string.

arg1 object

The value to replace {1} in the format string.

InternalDiagnosticMessage(string, object?, object?, object?)

Creates a new instance of the InternalDiagnosticMessage class with the provided message format and three arguments.

public InternalDiagnosticMessage(string messageFormat, object? arg0, object? arg1, object? arg2)

Parameters

messageFormat string

The message format string

arg0 object

The value to replace {0} in the format string.

arg1 object

The value to replace {1} in the format string.

arg2 object

The value to replace {2} in the format string.

InternalDiagnosticMessage(string, params object?[])

Creates a new instance of the InternalDiagnosticMessage class with the provided message format and multiple arguments.

public InternalDiagnosticMessage(string messageFormat, params object?[] args)

Parameters

messageFormat string

The message format string

args object[]

An object array that contains zero or more objects to format.

Properties

Message

Gets the internal diagnostic message.

public required string Message { get; set; }

Property Value

string

Methods

Serialize(JsonObjectSerializer)

Override to serialize the values in the message into JSON.

protected override void Serialize(JsonObjectSerializer serializer)

Parameters

serializer JsonObjectSerializer

The serializer to write values to.

ToString()

public override string ToString()

Returns

string

ValidateObjectState(HashSet<string>)

Called before serializing the message. Implementers are expected to call ValidatePropertyIsNotNull(object?, string, HashSet<string>) for each property that must have a value, to record invalid property values into the provided hash set.

protected override void ValidateObjectState(HashSet<string> invalidProperties)

Parameters

invalidProperties HashSet<string>

The hash set to record invalid properties into