Condividi tramite


Diagnostic.Create Metodo

Definizione

Overload

Create(DiagnosticDescriptor, Location, Object[])

Crea un'istanza di Diagnostic.

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

Crea un'istanza di Diagnostic.

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

Crea un'istanza di Diagnostic.

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

Crea un'istanza di Diagnostic.

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

Crea un'istanza di Diagnostic.

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

Crea un'istanza Diagnostic che è localizzabile.

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

Crea un'istanza Diagnostic che è localizzabile.

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 un'istanza di 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

Parametri

descriptor
DiagnosticDescriptor

Oggetto DiagnosticDescriptor che descrive la diagnostica

location
Location

Posizione primaria facoltativa della diagnostica. Se null, Location restituirà None.

messageArgs
Object[]

Argomenti al messaggio della diagnostica

Restituisce

Istanza di Diagnostic.

Si applica 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 un'istanza di 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

Parametri

descriptor
DiagnosticDescriptor

Oggetto DiagnosticDescriptor che descrive la diagnostica.

location
Location

Posizione primaria facoltativa della diagnostica. Se null, Location restituirà None.

additionalLocations
IEnumerable<Location>

Set facoltativo di posizioni aggiuntive correlate alla diagnostica. In genere, queste sono posizioni di altri elementi a cui si fa riferimento nel messaggio. Se null, AdditionalLocations restituirà un elenco vuoto.

messageArgs
Object[]

Argomenti al messaggio della diagnostica.

Restituisce

Istanza di Diagnostic.

Si applica 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 un'istanza di 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

Parametri

descriptor
DiagnosticDescriptor

Oggetto DiagnosticDescriptor che descrive la diagnostica.

location
Location

Posizione primaria facoltativa della diagnostica. Se null, Location restituirà None.

properties
ImmutableDictionary<String,String>

Set facoltativo di coppie nome-valore tramite cui l'analizzatore che crea la diagnostica può trasmettere informazioni più dettagliate al correzione. Se null, Properties restituirà Empty.

messageArgs
Object[]

Argomenti al messaggio della diagnostica.

Restituisce

Istanza di Diagnostic.

Si applica 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 un'istanza di 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

Parametri

descriptor
DiagnosticDescriptor

Oggetto DiagnosticDescriptor che descrive la diagnostica.

location
Location

Posizione primaria facoltativa della diagnostica. Se null, Location restituirà None.

additionalLocations
IEnumerable<Location>

Set facoltativo di posizioni aggiuntive correlate alla diagnostica. In genere, queste sono posizioni di altri elementi a cui si fa riferimento nel messaggio. Se null, AdditionalLocations restituirà un elenco vuoto.

properties
ImmutableDictionary<String,String>

Set facoltativo di coppie nome-valore tramite cui l'analizzatore che crea la diagnostica può trasmettere informazioni più dettagliate al correzione. Se null, Properties restituirà Empty.

messageArgs
Object[]

Argomenti al messaggio della diagnostica.

Restituisce

Istanza di Diagnostic.

Si applica 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 un'istanza di 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

Parametri

descriptor
DiagnosticDescriptor

Oggetto DiagnosticDescriptor che descrive la diagnostica.

location
Location

Posizione primaria facoltativa della diagnostica. Se null, Location restituirà None.

effectiveSeverity
DiagnosticSeverity

Gravità effettiva della diagnostica.

additionalLocations
IEnumerable<Location>

Set facoltativo di posizioni aggiuntive correlate alla diagnostica. In genere, queste sono posizioni di altri elementi a cui si fa riferimento nel messaggio. Se null, AdditionalLocations restituirà un elenco vuoto.

properties
ImmutableDictionary<String,String>

Set facoltativo di coppie nome-valore tramite cui l'analizzatore che crea la diagnostica può trasmettere informazioni più dettagliate al correzione. Se null, Properties restituirà Empty.

messageArgs
Object[]

Argomenti al messaggio della diagnostica.

Restituisce

Istanza di Diagnostic.

Si applica 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 un'istanza Diagnostic che è localizzabile.

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

Parametri

id
String

Identificatore per la diagnostica. Per la diagnostica generata dal compilatore, si tratta di un codice numerico con un prefisso come "CS1001".

category
String

Categoria della diagnostica. Per la diagnostica generata dal compilatore, la categoria sarà "Compilatore".

message
LocalizableString

Testo del messaggio di diagnostica.

severity
DiagnosticSeverity

Gravità effettiva della diagnostica.

defaultSeverity
DiagnosticSeverity

Gravità predefinita della diagnostica.

isEnabledByDefault
Boolean

True se la diagnostica è abilitata per impostazione predefinita

warningLevel
Int32

Il livello di avviso, maggiore di 0 se la gravità è Warning; in caso contrario, 0.

title
LocalizableString

Titolo localizzabile facoltativo che descrive la diagnostica.

description
LocalizableString

Descrizione localizzabile facoltativa per la diagnostica.

helpLink
String

Collegamento ipertestuale facoltativo che fornisce informazioni più dettagliate sulla diagnostica.

location
Location

Posizione primaria facoltativa della diagnostica. Se null, Location restituirà None.

additionalLocations
IEnumerable<Location>

Set facoltativo di posizioni aggiuntive correlate alla diagnostica. In genere, queste sono posizioni di altri elementi a cui si fa riferimento nel messaggio. Se null, AdditionalLocations restituirà un elenco vuoto.

customTags
IEnumerable<String>

Set facoltativo di tag personalizzati per la diagnostica. Vedere WellKnownDiagnosticTags per alcuni tag noti. Se null, Microsoft.CodeAnalysis.Diagnostic.CustomTags restituirà un elenco vuoto.

properties
ImmutableDictionary<String,String>

Set facoltativo di coppie nome-valore tramite cui l'analizzatore che crea la diagnostica può trasmettere informazioni più dettagliate al correzione. Se null, Properties restituirà Empty.

Restituisce

Istanza di Diagnostic.

Si applica 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 un'istanza Diagnostic che è localizzabile.

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

Parametri

id
String

Identificatore per la diagnostica. Per la diagnostica generata dal compilatore, si tratta di un codice numerico con un prefisso come "CS1001".

category
String

Categoria della diagnostica. Per la diagnostica generata dal compilatore, la categoria sarà "Compilatore".

message
LocalizableString

Testo del messaggio di diagnostica.

severity
DiagnosticSeverity

Gravità effettiva della diagnostica.

defaultSeverity
DiagnosticSeverity

Gravità predefinita della diagnostica.

isEnabledByDefault
Boolean

True se la diagnostica è abilitata per impostazione predefinita

warningLevel
Int32

Il livello di avviso, maggiore di 0 se la gravità è Warning; in caso contrario, 0.

isSuppressed
Boolean

Flag che indica se la diagnostica viene eliminata da un'eliminazione di origine.

title
LocalizableString

Titolo localizzabile facoltativo che descrive la diagnostica.

description
LocalizableString

Descrizione localizzabile facoltativa per la diagnostica.

helpLink
String

Collegamento ipertestuale facoltativo che fornisce informazioni più dettagliate sulla diagnostica.

location
Location

Posizione primaria facoltativa della diagnostica. Se null, Location restituirà None.

additionalLocations
IEnumerable<Location>

Set facoltativo di posizioni aggiuntive correlate alla diagnostica. In genere, queste sono posizioni di altri elementi a cui si fa riferimento nel messaggio. Se null, AdditionalLocations restituirà un elenco vuoto.

customTags
IEnumerable<String>

Set facoltativo di tag personalizzati per la diagnostica. Vedere WellKnownDiagnosticTags per alcuni tag noti. Se null, Microsoft.CodeAnalysis.Diagnostic.CustomTags restituirà un elenco vuoto.

properties
ImmutableDictionary<String,String>

Set facoltativo di coppie nome-valore tramite cui l'analizzatore che crea la diagnostica può trasmettere informazioni più dettagliate al correzione. Se null, Properties restituirà Empty.

Restituisce

Istanza di Diagnostic.

Si applica a