Compartilhar via


Diagnostic.Create Método

Definição

Sobrecargas

Create(DiagnosticDescriptor, Location, Object[])

Cria uma instância Diagnostic.

Create(DiagnosticDescriptor, Location, IEnumerable<Location>, Object[])

Cria uma instância Diagnostic.

Create(DiagnosticDescriptor, Location, ImmutableDictionary<String,String>, Object[])

Cria uma instância Diagnostic.

Create(DiagnosticDescriptor, Location, IEnumerable<Location>, ImmutableDictionary<String,String>, Object[])

Cria uma instância Diagnostic.

Create(DiagnosticDescriptor, Location, DiagnosticSeverity, IEnumerable<Location>, ImmutableDictionary<String,String>, Object[])

Cria uma instância Diagnostic.

Create(String, String, LocalizableString, DiagnosticSeverity, DiagnosticSeverity, Boolean, Int32, LocalizableString, LocalizableString, String, Location, IEnumerable<Location>, IEnumerable<String>, ImmutableDictionary<String,String>)

Cria uma Diagnostic instância que é localizável.

Create(String, String, LocalizableString, DiagnosticSeverity, DiagnosticSeverity, Boolean, Int32, Boolean, LocalizableString, LocalizableString, String, Location, IEnumerable<Location>, IEnumerable<String>, ImmutableDictionary<String,String>)

Cria uma Diagnostic instância que é localizável.

Create(DiagnosticDescriptor, Location, Object[])

Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs

Cria uma instância Diagnostic.

public:
 static Microsoft::CodeAnalysis::Diagnostic ^ Create(Microsoft::CodeAnalysis::DiagnosticDescriptor ^ descriptor, Microsoft::CodeAnalysis::Location ^ location, ... cli::array <System::Object ^> ^ messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, params object[] messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location? location, params object?[]? messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, params object?[] messageArgs);
static member Create : Microsoft.CodeAnalysis.DiagnosticDescriptor * Microsoft.CodeAnalysis.Location * obj[] -> Microsoft.CodeAnalysis.Diagnostic
Public Shared Function Create (descriptor As DiagnosticDescriptor, location As Location, ParamArray messageArgs As Object()) As Diagnostic

Parâmetros

descriptor
DiagnosticDescriptor

Um DiagnosticDescriptor que descreve o diagnóstico

location
Location

Um local primário opcional do diagnóstico. Se for nulo, Location retornará None.

messageArgs
Object[]

Argumentos para a mensagem do diagnóstico

Retornos

A instância Diagnostic.

Aplica-se a

Create(DiagnosticDescriptor, Location, IEnumerable<Location>, Object[])

Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs

Cria uma instância Diagnostic.

public:
 static Microsoft::CodeAnalysis::Diagnostic ^ Create(Microsoft::CodeAnalysis::DiagnosticDescriptor ^ descriptor, Microsoft::CodeAnalysis::Location ^ location, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::Location ^> ^ additionalLocations, ... cli::array <System::Object ^> ^ messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location> additionalLocations, params object[] messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location? location, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations, params object?[]? messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations, params object?[] messageArgs);
static member Create : Microsoft.CodeAnalysis.DiagnosticDescriptor * Microsoft.CodeAnalysis.Location * seq<Microsoft.CodeAnalysis.Location> * obj[] -> Microsoft.CodeAnalysis.Diagnostic
Public Shared Function Create (descriptor As DiagnosticDescriptor, location As Location, additionalLocations As IEnumerable(Of Location), ParamArray messageArgs As Object()) As Diagnostic

Parâmetros

descriptor
DiagnosticDescriptor

Um DiagnosticDescriptor que descreve o diagnóstico.

location
Location

Um local primário opcional do diagnóstico. Se for nulo, Location retornará None.

additionalLocations
IEnumerable<Location>

Um conjunto opcional de locais adicionais relacionados ao diagnóstico. Normalmente, esses são locais de outros itens referenciados na mensagem. Se for nulo, AdditionalLocations retornará uma lista vazia.

messageArgs
Object[]

Argumentos para a mensagem do diagnóstico.

Retornos

A instância Diagnostic.

Aplica-se a

Create(DiagnosticDescriptor, Location, ImmutableDictionary<String,String>, Object[])

Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs

Cria uma instância Diagnostic.

public:
 static Microsoft::CodeAnalysis::Diagnostic ^ Create(Microsoft::CodeAnalysis::DiagnosticDescriptor ^ descriptor, Microsoft::CodeAnalysis::Location ^ location, System::Collections::Immutable::ImmutableDictionary<System::String ^, System::String ^> ^ properties, ... cli::array <System::Object ^> ^ messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, System.Collections.Immutable.ImmutableDictionary<string,string> properties, params object[] messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location? location, System.Collections.Immutable.ImmutableDictionary<string,string?>? properties, params object?[]? messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, System.Collections.Immutable.ImmutableDictionary<string,string>? properties, params object?[] messageArgs);
static member Create : Microsoft.CodeAnalysis.DiagnosticDescriptor * Microsoft.CodeAnalysis.Location * System.Collections.Immutable.ImmutableDictionary<string, string> * obj[] -> Microsoft.CodeAnalysis.Diagnostic
Public Shared Function Create (descriptor As DiagnosticDescriptor, location As Location, properties As ImmutableDictionary(Of String, String), ParamArray messageArgs As Object()) As Diagnostic

Parâmetros

descriptor
DiagnosticDescriptor

Um DiagnosticDescriptor que descreve o diagnóstico.

location
Location

Um local primário opcional do diagnóstico. Se for nulo, Location retornará None.

properties
ImmutableDictionary<String,String>

Um conjunto opcional de pares nome-valor por meio do qual o analisador que cria o diagnóstico pode transmitir informações mais detalhadas para o corredor. Se for nulo, Properties retornará Empty.

messageArgs
Object[]

Argumentos para a mensagem do diagnóstico.

Retornos

A instância Diagnostic.

Aplica-se a

Create(DiagnosticDescriptor, Location, IEnumerable<Location>, ImmutableDictionary<String,String>, Object[])

Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs

Cria uma instância Diagnostic.

public:
 static Microsoft::CodeAnalysis::Diagnostic ^ Create(Microsoft::CodeAnalysis::DiagnosticDescriptor ^ descriptor, Microsoft::CodeAnalysis::Location ^ location, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::Location ^> ^ additionalLocations, System::Collections::Immutable::ImmutableDictionary<System::String ^, System::String ^> ^ properties, ... cli::array <System::Object ^> ^ messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location> additionalLocations, System.Collections.Immutable.ImmutableDictionary<string,string> properties, params object[] messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location? location, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations, System.Collections.Immutable.ImmutableDictionary<string,string?>? properties, params object?[]? messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations, System.Collections.Immutable.ImmutableDictionary<string,string>? properties, params object?[] messageArgs);
static member Create : Microsoft.CodeAnalysis.DiagnosticDescriptor * Microsoft.CodeAnalysis.Location * seq<Microsoft.CodeAnalysis.Location> * System.Collections.Immutable.ImmutableDictionary<string, string> * obj[] -> Microsoft.CodeAnalysis.Diagnostic
Public Shared Function Create (descriptor As DiagnosticDescriptor, location As Location, additionalLocations As IEnumerable(Of Location), properties As ImmutableDictionary(Of String, String), ParamArray messageArgs As Object()) As Diagnostic

Parâmetros

descriptor
DiagnosticDescriptor

Um DiagnosticDescriptor que descreve o diagnóstico.

location
Location

Um local primário opcional do diagnóstico. Se for nulo, Location retornará None.

additionalLocations
IEnumerable<Location>

Um conjunto opcional de locais adicionais relacionados ao diagnóstico. Normalmente, esses são locais de outros itens referenciados na mensagem. Se for nulo, AdditionalLocations retornará uma lista vazia.

properties
ImmutableDictionary<String,String>

Um conjunto opcional de pares nome-valor por meio do qual o analisador que cria o diagnóstico pode transmitir informações mais detalhadas para o corredor. Se for nulo, Properties retornará Empty.

messageArgs
Object[]

Argumentos para a mensagem do diagnóstico.

Retornos

A instância Diagnostic.

Aplica-se a

Create(DiagnosticDescriptor, Location, DiagnosticSeverity, IEnumerable<Location>, ImmutableDictionary<String,String>, Object[])

Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs

Cria uma instância Diagnostic.

public:
 static Microsoft::CodeAnalysis::Diagnostic ^ Create(Microsoft::CodeAnalysis::DiagnosticDescriptor ^ descriptor, Microsoft::CodeAnalysis::Location ^ location, Microsoft::CodeAnalysis::DiagnosticSeverity effectiveSeverity, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::Location ^> ^ additionalLocations, System::Collections::Immutable::ImmutableDictionary<System::String ^, System::String ^> ^ properties, ... cli::array <System::Object ^> ^ messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, Microsoft.CodeAnalysis.DiagnosticSeverity effectiveSeverity, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location> additionalLocations, System.Collections.Immutable.ImmutableDictionary<string,string> properties, params object[] messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location? location, Microsoft.CodeAnalysis.DiagnosticSeverity effectiveSeverity, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations, System.Collections.Immutable.ImmutableDictionary<string,string?>? properties, params object?[]? messageArgs);
public static Microsoft.CodeAnalysis.Diagnostic Create (Microsoft.CodeAnalysis.DiagnosticDescriptor descriptor, Microsoft.CodeAnalysis.Location location, Microsoft.CodeAnalysis.DiagnosticSeverity effectiveSeverity, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations, System.Collections.Immutable.ImmutableDictionary<string,string>? properties, params object?[] messageArgs);
static member Create : Microsoft.CodeAnalysis.DiagnosticDescriptor * Microsoft.CodeAnalysis.Location * Microsoft.CodeAnalysis.DiagnosticSeverity * seq<Microsoft.CodeAnalysis.Location> * System.Collections.Immutable.ImmutableDictionary<string, string> * obj[] -> Microsoft.CodeAnalysis.Diagnostic
Public Shared Function Create (descriptor As DiagnosticDescriptor, location As Location, effectiveSeverity As DiagnosticSeverity, additionalLocations As IEnumerable(Of Location), properties As ImmutableDictionary(Of String, String), ParamArray messageArgs As Object()) As Diagnostic

Parâmetros

descriptor
DiagnosticDescriptor

Um DiagnosticDescriptor que descreve o diagnóstico.

location
Location

Um local primário opcional do diagnóstico. Se for nulo, Location retornará None.

effectiveSeverity
DiagnosticSeverity

Gravidade efetiva do diagnóstico.

additionalLocations
IEnumerable<Location>

Um conjunto opcional de locais adicionais relacionados ao diagnóstico. Normalmente, esses são locais de outros itens referenciados na mensagem. Se for nulo, AdditionalLocations retornará uma lista vazia.

properties
ImmutableDictionary<String,String>

Um conjunto opcional de pares nome-valor por meio do qual o analisador que cria o diagnóstico pode transmitir informações mais detalhadas para o corredor. Se for nulo, Properties retornará Empty.

messageArgs
Object[]

Argumentos para a mensagem do diagnóstico.

Retornos

A instância Diagnostic.

Aplica-se a

Create(String, String, LocalizableString, DiagnosticSeverity, DiagnosticSeverity, Boolean, Int32, LocalizableString, LocalizableString, String, Location, IEnumerable<Location>, IEnumerable<String>, ImmutableDictionary<String,String>)

Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs

Cria uma Diagnostic instância que é localizável.

public static Microsoft.CodeAnalysis.Diagnostic Create (string id, string category, Microsoft.CodeAnalysis.LocalizableString message, Microsoft.CodeAnalysis.DiagnosticSeverity severity, Microsoft.CodeAnalysis.DiagnosticSeverity defaultSeverity, bool isEnabledByDefault, int warningLevel, Microsoft.CodeAnalysis.LocalizableString title = default, Microsoft.CodeAnalysis.LocalizableString description = default, string helpLink = default, Microsoft.CodeAnalysis.Location location = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location> additionalLocations = default, System.Collections.Generic.IEnumerable<string> customTags = default, System.Collections.Immutable.ImmutableDictionary<string,string> properties = default);
public static Microsoft.CodeAnalysis.Diagnostic Create (string id, string category, Microsoft.CodeAnalysis.LocalizableString message, Microsoft.CodeAnalysis.DiagnosticSeverity severity, Microsoft.CodeAnalysis.DiagnosticSeverity defaultSeverity, bool isEnabledByDefault, int warningLevel, Microsoft.CodeAnalysis.LocalizableString? title = default, Microsoft.CodeAnalysis.LocalizableString? description = default, string? helpLink = default, Microsoft.CodeAnalysis.Location? location = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations = default, System.Collections.Generic.IEnumerable<string>? customTags = default, System.Collections.Immutable.ImmutableDictionary<string,string?>? properties = default);
public static Microsoft.CodeAnalysis.Diagnostic Create (string id, string category, Microsoft.CodeAnalysis.LocalizableString message, Microsoft.CodeAnalysis.DiagnosticSeverity severity, Microsoft.CodeAnalysis.DiagnosticSeverity defaultSeverity, bool isEnabledByDefault, int warningLevel, Microsoft.CodeAnalysis.LocalizableString? title = default, Microsoft.CodeAnalysis.LocalizableString? description = default, string? helpLink = default, Microsoft.CodeAnalysis.Location? location = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations = default, System.Collections.Generic.IEnumerable<string>? customTags = default, System.Collections.Immutable.ImmutableDictionary<string,string>? properties = default);
static member Create : string * string * Microsoft.CodeAnalysis.LocalizableString * Microsoft.CodeAnalysis.DiagnosticSeverity * Microsoft.CodeAnalysis.DiagnosticSeverity * bool * int * Microsoft.CodeAnalysis.LocalizableString * Microsoft.CodeAnalysis.LocalizableString * string * Microsoft.CodeAnalysis.Location * seq<Microsoft.CodeAnalysis.Location> * seq<string> * System.Collections.Immutable.ImmutableDictionary<string, string> -> Microsoft.CodeAnalysis.Diagnostic
Public Shared Function Create (id As String, category As String, message As LocalizableString, severity As DiagnosticSeverity, defaultSeverity As DiagnosticSeverity, isEnabledByDefault As Boolean, warningLevel As Integer, Optional title As LocalizableString = Nothing, Optional description As LocalizableString = Nothing, Optional helpLink As String = Nothing, Optional location As Location = Nothing, Optional additionalLocations As IEnumerable(Of Location) = Nothing, Optional customTags As IEnumerable(Of String) = Nothing, Optional properties As ImmutableDictionary(Of String, String) = Nothing) As Diagnostic

Parâmetros

id
String

Um identificador para o diagnóstico. Para diagnóstico gerado pelo compilador, esse será um código numérico com um prefixo como "CS1001".

category
String

A categoria do diagnóstico. Para diagnóstico gerado pelo compilador, a categoria será "Compilador".

message
LocalizableString

O texto da mensagem de diagnóstico.

severity
DiagnosticSeverity

A gravidade efetiva do diagnóstico.

defaultSeverity
DiagnosticSeverity

A gravidade padrão do diagnóstico.

isEnabledByDefault
Boolean

True se o diagnóstico estiver habilitado por padrão

warningLevel
Int32

O nível de aviso, maior que 0 se severidade for Warning; caso contrário, 0.

title
LocalizableString

Um título localizável curto opcional que descreve o diagnóstico.

description
LocalizableString

Uma descrição opcional mais localizável para o diagnóstico.

helpLink
String

Um hiperlink opcional que fornece informações mais detalhadas sobre o diagnóstico.

location
Location

Um local primário opcional do diagnóstico. Se for nulo, Location retornará None.

additionalLocations
IEnumerable<Location>

Um conjunto opcional de locais adicionais relacionados ao diagnóstico. Normalmente, esses são locais de outros itens referenciados na mensagem. Se for nulo, AdditionalLocations retornará uma lista vazia.

customTags
IEnumerable<String>

Um conjunto opcional de marcas personalizadas para o diagnóstico. Confira WellKnownDiagnosticTags algumas marcas conhecidas. Se for nulo, Microsoft.CodeAnalysis.Diagnostic.CustomTags retornará uma lista vazia.

properties
ImmutableDictionary<String,String>

Um conjunto opcional de pares nome-valor por meio do qual o analisador que cria o diagnóstico pode transmitir informações mais detalhadas para o corredor. Se for nulo, Properties retornará Empty.

Retornos

A instância Diagnostic.

Aplica-se a

Create(String, String, LocalizableString, DiagnosticSeverity, DiagnosticSeverity, Boolean, Int32, Boolean, LocalizableString, LocalizableString, String, Location, IEnumerable<Location>, IEnumerable<String>, ImmutableDictionary<String,String>)

Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs
Source:
Diagnostic.cs

Cria uma Diagnostic instância que é localizável.

public static Microsoft.CodeAnalysis.Diagnostic Create (string id, string category, Microsoft.CodeAnalysis.LocalizableString message, Microsoft.CodeAnalysis.DiagnosticSeverity severity, Microsoft.CodeAnalysis.DiagnosticSeverity defaultSeverity, bool isEnabledByDefault, int warningLevel, bool isSuppressed, Microsoft.CodeAnalysis.LocalizableString title = default, Microsoft.CodeAnalysis.LocalizableString description = default, string helpLink = default, Microsoft.CodeAnalysis.Location location = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location> additionalLocations = default, System.Collections.Generic.IEnumerable<string> customTags = default, System.Collections.Immutable.ImmutableDictionary<string,string> properties = default);
public static Microsoft.CodeAnalysis.Diagnostic Create (string id, string category, Microsoft.CodeAnalysis.LocalizableString message, Microsoft.CodeAnalysis.DiagnosticSeverity severity, Microsoft.CodeAnalysis.DiagnosticSeverity defaultSeverity, bool isEnabledByDefault, int warningLevel, bool isSuppressed, Microsoft.CodeAnalysis.LocalizableString? title = default, Microsoft.CodeAnalysis.LocalizableString? description = default, string? helpLink = default, Microsoft.CodeAnalysis.Location? location = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations = default, System.Collections.Generic.IEnumerable<string>? customTags = default, System.Collections.Immutable.ImmutableDictionary<string,string?>? properties = default);
public static Microsoft.CodeAnalysis.Diagnostic Create (string id, string category, Microsoft.CodeAnalysis.LocalizableString message, Microsoft.CodeAnalysis.DiagnosticSeverity severity, Microsoft.CodeAnalysis.DiagnosticSeverity defaultSeverity, bool isEnabledByDefault, int warningLevel, bool isSuppressed, Microsoft.CodeAnalysis.LocalizableString? title = default, Microsoft.CodeAnalysis.LocalizableString? description = default, string? helpLink = default, Microsoft.CodeAnalysis.Location? location = default, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Location>? additionalLocations = default, System.Collections.Generic.IEnumerable<string>? customTags = default, System.Collections.Immutable.ImmutableDictionary<string,string>? properties = default);
static member Create : string * string * Microsoft.CodeAnalysis.LocalizableString * Microsoft.CodeAnalysis.DiagnosticSeverity * Microsoft.CodeAnalysis.DiagnosticSeverity * bool * int * bool * Microsoft.CodeAnalysis.LocalizableString * Microsoft.CodeAnalysis.LocalizableString * string * Microsoft.CodeAnalysis.Location * seq<Microsoft.CodeAnalysis.Location> * seq<string> * System.Collections.Immutable.ImmutableDictionary<string, string> -> Microsoft.CodeAnalysis.Diagnostic
Public Shared Function Create (id As String, category As String, message As LocalizableString, severity As DiagnosticSeverity, defaultSeverity As DiagnosticSeverity, isEnabledByDefault As Boolean, warningLevel As Integer, isSuppressed As Boolean, Optional title As LocalizableString = Nothing, Optional description As LocalizableString = Nothing, Optional helpLink As String = Nothing, Optional location As Location = Nothing, Optional additionalLocations As IEnumerable(Of Location) = Nothing, Optional customTags As IEnumerable(Of String) = Nothing, Optional properties As ImmutableDictionary(Of String, String) = Nothing) As Diagnostic

Parâmetros

id
String

Um identificador para o diagnóstico. Para diagnóstico gerado pelo compilador, esse será um código numérico com um prefixo como "CS1001".

category
String

A categoria do diagnóstico. Para diagnóstico gerado pelo compilador, a categoria será "Compilador".

message
LocalizableString

O texto da mensagem de diagnóstico.

severity
DiagnosticSeverity

A gravidade efetiva do diagnóstico.

defaultSeverity
DiagnosticSeverity

A gravidade padrão do diagnóstico.

isEnabledByDefault
Boolean

True se o diagnóstico estiver habilitado por padrão

warningLevel
Int32

O nível de aviso, maior que 0 se severidade for Warning; caso contrário, 0.

isSuppressed
Boolean

Sinalizador que indica se o diagnóstico é suprimido por uma supressão de origem.

title
LocalizableString

Um título localizável curto opcional que descreve o diagnóstico.

description
LocalizableString

Uma descrição opcional mais localizável para o diagnóstico.

helpLink
String

Um hiperlink opcional que fornece informações mais detalhadas sobre o diagnóstico.

location
Location

Um local primário opcional do diagnóstico. Se for nulo, Location retornará None.

additionalLocations
IEnumerable<Location>

Um conjunto opcional de locais adicionais relacionados ao diagnóstico. Normalmente, esses são locais de outros itens referenciados na mensagem. Se for nulo, AdditionalLocations retornará uma lista vazia.

customTags
IEnumerable<String>

Um conjunto opcional de marcas personalizadas para o diagnóstico. Confira WellKnownDiagnosticTags algumas marcas conhecidas. Se for nulo, Microsoft.CodeAnalysis.Diagnostic.CustomTags retornará uma lista vazia.

properties
ImmutableDictionary<String,String>

Um conjunto opcional de pares nome-valor por meio do qual o analisador que cria o diagnóstico pode transmitir informações mais detalhadas para o corredor. Se for nulo, Properties retornará Empty.

Retornos

A instância Diagnostic.

Aplica-se a