Compartir a través de


Diagnostic.Create Método

Definición

Sobrecargas

Create(DiagnosticDescriptor, Location, Object[])

Crea una instancia de Diagnostic.

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

Crea una instancia de Diagnostic.

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

Crea una instancia de Diagnostic.

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

Crea una instancia de Diagnostic.

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

Crea una instancia de Diagnostic.

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

Crea una Diagnostic instancia que es localizable.

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

Crea una Diagnostic instancia que es localizable.

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

Crea una instancia de 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

que DiagnosticDescriptor describe el diagnóstico

location
Location

Una ubicación principal opcional del diagnóstico. Si es null, Location devolverá None.

messageArgs
Object[]

Argumentos para el mensaje del diagnóstico

Devoluciones

Instancia de Diagnostic.

Se aplica 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

Crea una instancia de 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

que DiagnosticDescriptor describe el diagnóstico.

location
Location

Una ubicación principal opcional del diagnóstico. Si es null, Location devolverá None.

additionalLocations
IEnumerable<Location>

Un conjunto opcional de ubicaciones adicionales relacionadas con el diagnóstico. Normalmente, se trata de ubicaciones de otros elementos a los que se hace referencia en el mensaje. Si es null, AdditionalLocations devolverá una lista vacía.

messageArgs
Object[]

Argumentos para el mensaje del diagnóstico.

Devoluciones

Instancia de Diagnostic.

Se aplica 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

Crea una instancia de 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

que DiagnosticDescriptor describe el diagnóstico.

location
Location

Una ubicación principal opcional del diagnóstico. Si es null, Location devolverá None.

properties
ImmutableDictionary<String,String>

Un conjunto opcional de pares nombre-valor por medio del cual el analizador que crea el diagnóstico puede transmitir información más detallada al solucionador. Si es null, Properties devolverá Empty.

messageArgs
Object[]

Argumentos para el mensaje del diagnóstico.

Devoluciones

Instancia de Diagnostic.

Se aplica 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

Crea una instancia de 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

que DiagnosticDescriptor describe el diagnóstico.

location
Location

Una ubicación principal opcional del diagnóstico. Si es null, Location devolverá None.

additionalLocations
IEnumerable<Location>

Un conjunto opcional de ubicaciones adicionales relacionadas con el diagnóstico. Normalmente, se trata de ubicaciones de otros elementos a los que se hace referencia en el mensaje. Si es null, AdditionalLocations devolverá una lista vacía.

properties
ImmutableDictionary<String,String>

Un conjunto opcional de pares nombre-valor por medio del cual el analizador que crea el diagnóstico puede transmitir información más detallada al solucionador. Si es null, Properties devolverá Empty.

messageArgs
Object[]

Argumentos para el mensaje del diagnóstico.

Devoluciones

Instancia de Diagnostic.

Se aplica 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

Crea una instancia de 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

que DiagnosticDescriptor describe el diagnóstico.

location
Location

Una ubicación principal opcional del diagnóstico. Si es null, Location devolverá None.

effectiveSeverity
DiagnosticSeverity

Gravedad efectiva del diagnóstico.

additionalLocations
IEnumerable<Location>

Un conjunto opcional de ubicaciones adicionales relacionadas con el diagnóstico. Normalmente, se trata de ubicaciones de otros elementos a los que se hace referencia en el mensaje. Si es null, AdditionalLocations devolverá una lista vacía.

properties
ImmutableDictionary<String,String>

Un conjunto opcional de pares nombre-valor por medio del cual el analizador que crea el diagnóstico puede transmitir información más detallada al solucionador. Si es null, Properties devolverá Empty.

messageArgs
Object[]

Argumentos para el mensaje del diagnóstico.

Devoluciones

Instancia de Diagnostic.

Se aplica 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

Crea una Diagnostic instancia que es localizable.

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

Identificador del diagnóstico. Para los diagnósticos generados por el compilador, será un código numérico con un prefijo como "CS1001".

category
String

Categoría del diagnóstico. Para los diagnósticos generados por el compilador, la categoría será "Compilador".

message
LocalizableString

Texto del mensaje de diagnóstico.

severity
DiagnosticSeverity

Gravedad efectiva del diagnóstico.

defaultSeverity
DiagnosticSeverity

Gravedad predeterminada del diagnóstico.

isEnabledByDefault
Boolean

True si el diagnóstico está habilitado de forma predeterminada

warningLevel
Int32

El nivel de advertencia, mayor que 0 si la gravedad es Warning; en caso contrario, 0.

title
LocalizableString

Título localizable corto opcional que describe el diagnóstico.

description
LocalizableString

Una descripción más localizable opcional para el diagnóstico.

helpLink
String

Un hipervínculo opcional que proporciona información más detallada sobre el diagnóstico.

location
Location

Una ubicación principal opcional del diagnóstico. Si es null, Location devolverá None.

additionalLocations
IEnumerable<Location>

Un conjunto opcional de ubicaciones adicionales relacionadas con el diagnóstico. Normalmente, se trata de ubicaciones de otros elementos a los que se hace referencia en el mensaje. Si es null, AdditionalLocations devolverá una lista vacía.

customTags
IEnumerable<String>

Conjunto opcional de etiquetas personalizadas para el diagnóstico. Consulte WellKnownDiagnosticTags para obtener algunas etiquetas conocidas. Si es null, Microsoft.CodeAnalysis.Diagnostic.CustomTags devolverá una lista vacía.

properties
ImmutableDictionary<String,String>

Un conjunto opcional de pares nombre-valor por medio del cual el analizador que crea el diagnóstico puede transmitir información más detallada al solucionador. Si es null, Properties devolverá Empty.

Devoluciones

Instancia de Diagnostic.

Se aplica 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

Crea una Diagnostic instancia que es localizable.

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

Identificador del diagnóstico. Para los diagnósticos generados por el compilador, será un código numérico con un prefijo como "CS1001".

category
String

Categoría del diagnóstico. Para los diagnósticos generados por el compilador, la categoría será "Compilador".

message
LocalizableString

Texto del mensaje de diagnóstico.

severity
DiagnosticSeverity

Gravedad efectiva del diagnóstico.

defaultSeverity
DiagnosticSeverity

Gravedad predeterminada del diagnóstico.

isEnabledByDefault
Boolean

True si el diagnóstico está habilitado de forma predeterminada

warningLevel
Int32

El nivel de advertencia, mayor que 0 si la gravedad es Warning; en caso contrario, 0.

isSuppressed
Boolean

Marca que indica si el diagnóstico se suprime mediante una supresión de origen.

title
LocalizableString

Título localizable corto opcional que describe el diagnóstico.

description
LocalizableString

Una descripción más localizable opcional para el diagnóstico.

helpLink
String

Un hipervínculo opcional que proporciona información más detallada sobre el diagnóstico.

location
Location

Una ubicación principal opcional del diagnóstico. Si es null, Location devolverá None.

additionalLocations
IEnumerable<Location>

Un conjunto opcional de ubicaciones adicionales relacionadas con el diagnóstico. Normalmente, se trata de ubicaciones de otros elementos a los que se hace referencia en el mensaje. Si es null, AdditionalLocations devolverá una lista vacía.

customTags
IEnumerable<String>

Conjunto opcional de etiquetas personalizadas para el diagnóstico. Consulte WellKnownDiagnosticTags para obtener algunas etiquetas conocidas. Si es null, Microsoft.CodeAnalysis.Diagnostic.CustomTags devolverá una lista vacía.

properties
ImmutableDictionary<String,String>

Un conjunto opcional de pares nombre-valor por medio del cual el analizador que crea el diagnóstico puede transmitir información más detallada al solucionador. Si es null, Properties devolverá Empty.

Devoluciones

Instancia de Diagnostic.

Se aplica a