Udostępnij za pośrednictwem


Diagnostic Constructors

Definition

Overloads

Diagnostic(String, String, DiagnosticSeverity, Range, DiagnosticTags, IReadOnlyList<DiagnosticRelatedInformation>, String, String, String, Nullable<Int32>, String, IReadOnlyList<ProjectIdentifier>, String, String, Nullable<Int32>)

Initializes a new instance of the Diagnostic class.

Diagnostic(String, String, DiagnosticSeverity, Range, String, DiagnosticTags, IReadOnlyList<DiagnosticRelatedInformation>, String, String, String, Nullable<Int32>, String, IReadOnlyList<ProjectIdentifier>, String, String, Nullable<Int32>)

Initializes a new instance of the Diagnostic class.

Diagnostic(String, String, DiagnosticSeverity, Range, DiagnosticTags, IReadOnlyList<DiagnosticRelatedInformation>, String, String, String, Nullable<Int32>, String, IReadOnlyList<ProjectIdentifier>, String, String, Nullable<Int32>)

Initializes a new instance of the Diagnostic class.

public Diagnostic (string message, string? code, Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticSeverity severity, Microsoft.VisualStudio.RpcContracts.Utilities.Range range, Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticTags tags = Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticTags.None, System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticRelatedInformation>? relatedInformation = default, string? expandedMessage = default, string? source = default, string? helpLink = default, int? diagnosticRank = default, string? diagnosticType = default, System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.Utilities.ProjectIdentifier>? projects = default, string? identifier = default, string? toolTip = default, int? outputId = default);
new Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.Diagnostic : string * string * Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticSeverity * Microsoft.VisualStudio.RpcContracts.Utilities.Range * Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticTags * System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticRelatedInformation> * string * string * string * Nullable<int> * string * System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.Utilities.ProjectIdentifier> * string * string * Nullable<int> -> Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.Diagnostic
Public Sub New (message As String, code As String, severity As DiagnosticSeverity, range As Range, Optional tags As DiagnosticTags = Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticTags.None, Optional relatedInformation As IReadOnlyList(Of DiagnosticRelatedInformation) = Nothing, Optional expandedMessage As String = Nothing, Optional source As String = Nothing, Optional helpLink As String = Nothing, Optional diagnosticRank As Nullable(Of Integer) = Nothing, Optional diagnosticType As String = Nothing, Optional projects As IReadOnlyList(Of ProjectIdentifier) = Nothing, Optional identifier As String = Nothing, Optional toolTip As String = Nothing, Optional outputId As Nullable(Of Integer) = Nothing)

Parameters

message
String

A description of the diagnostic.

code
String

The code associated with the diagnostic.

severity
DiagnosticSeverity

The severity of the diagnostic.

range
Range

The location of the diagnostic.

tags
DiagnosticTags

DiagnosticTags associated with the diagnostic.

relatedInformation
IReadOnlyList<DiagnosticRelatedInformation>

Additional information related to the diagnostic.

expandedMessage
String

An expanded description of the diagnostic.

source
String

A localized string describing the source of the diagnostic ("lint", "msbuild", etc.).

helpLink
String

A URL to navigate to if the user asks for help on the diagnostic.

diagnosticRank
Nullable<Int32>

An indication of the whether the diagnostic could be side effect of another diagnostic. Used for the default sort.

diagnosticType
String

A localized string describing the class of the diagnostic ("Performance", "Security", "Style", etc.).

projects
IReadOnlyList<ProjectIdentifier>

The projects in which this diagnostic was reported.

identifier
String

The identifier used to indicate whether two distinct diagnostics (possibly from different sources) can be merged.

toolTip
String

The tool tip displayed when the user hovers over the error in the error list.

outputId
Nullable<Int32>

The identifier used to link the diagnostic to a line of text in the output window.

Applies to

Diagnostic(String, String, DiagnosticSeverity, Range, String, DiagnosticTags, IReadOnlyList<DiagnosticRelatedInformation>, String, String, String, Nullable<Int32>, String, IReadOnlyList<ProjectIdentifier>, String, String, Nullable<Int32>)

Initializes a new instance of the Diagnostic class.

public Diagnostic (string message, string? code, Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticSeverity severity, Microsoft.VisualStudio.RpcContracts.Utilities.Range range, string? customEditorDiagnosticRepresentation, Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticTags tags = Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticTags.None, System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticRelatedInformation>? relatedInformation = default, string? expandedMessage = default, string? source = default, string? helpLink = default, int? diagnosticRank = default, string? diagnosticType = default, System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.Utilities.ProjectIdentifier>? projects = default, string? identifier = default, string? toolTip = default, int? outputId = default);
new Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.Diagnostic : string * string * Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticSeverity * Microsoft.VisualStudio.RpcContracts.Utilities.Range * string * Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticTags * System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticRelatedInformation> * string * string * string * Nullable<int> * string * System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.Utilities.ProjectIdentifier> * string * string * Nullable<int> -> Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.Diagnostic
Public Sub New (message As String, code As String, severity As DiagnosticSeverity, range As Range, customEditorDiagnosticRepresentation As String, Optional tags As DiagnosticTags = Microsoft.VisualStudio.RpcContracts.DiagnosticManagement.DiagnosticTags.None, Optional relatedInformation As IReadOnlyList(Of DiagnosticRelatedInformation) = Nothing, Optional expandedMessage As String = Nothing, Optional source As String = Nothing, Optional helpLink As String = Nothing, Optional diagnosticRank As Nullable(Of Integer) = Nothing, Optional diagnosticType As String = Nothing, Optional projects As IReadOnlyList(Of ProjectIdentifier) = Nothing, Optional identifier As String = Nothing, Optional toolTip As String = Nothing, Optional outputId As Nullable(Of Integer) = Nothing)

Parameters

message
String

A description of the diagnostic.

code
String

The code associated with the diagnostic.

severity
DiagnosticSeverity

The severity of the diagnostic.

range
Range

The location of the diagnostic.

customEditorDiagnosticRepresentation
String

The name of the EditorFormatMapDefinition used to represent the diagnostic.

tags
DiagnosticTags

DiagnosticTags associated with the diagnostic.

relatedInformation
IReadOnlyList<DiagnosticRelatedInformation>

Additional information related to the diagnostic.

expandedMessage
String

An expanded description of the diagnostic.

source
String

A localized string describing the source of the diagnostic ("lint", "msbuild", etc.).

helpLink
String

A URL to navigate to if the user asks for help on the diagnostic.

diagnosticRank
Nullable<Int32>

An indication of the whether the diagnostic could be side effect of another diagnostic. Used for the default sort.

diagnosticType
String

A localized string describing the class of the diagnostic ("Performance", "Security", "Style", etc.).

projects
IReadOnlyList<ProjectIdentifier>

The projects in which this diagnostic was reported.

identifier
String

The identifier used to indicate whether two distinct diagnostics (possibly from different sources) can be merged.

toolTip
String

The tool tip displayed when the user hovers over the error in the error list.

outputId
Nullable<Int32>

The identifier used to link the diagnostic to a line of text in the output window.

Applies to