Partilhar via


DiagnosticFormatter.Format(Diagnostic, IFormatProvider) Method

Definition

Formats the Diagnostic message using the optional IFormatProvider.

public virtual string Format (Microsoft.CodeAnalysis.Diagnostic diagnostic, IFormatProvider formatter = default);
public virtual string Format (Microsoft.CodeAnalysis.Diagnostic diagnostic, IFormatProvider? formatter = default);
abstract member Format : Microsoft.CodeAnalysis.Diagnostic * IFormatProvider -> string
override this.Format : Microsoft.CodeAnalysis.Diagnostic * IFormatProvider -> string
Public Overridable Function Format (diagnostic As Diagnostic, Optional formatter As IFormatProvider = Nothing) As String

Parameters

diagnostic
Diagnostic

The diagnostic.

formatter
IFormatProvider

The formatter; or null to use the default formatter.

Returns

The formatted message.

Applies to