Diagnostic.Create Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
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
- Source:
- Diagnostic.cs
Crée une instance 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
Paramètres
- descriptor
- DiagnosticDescriptor
décrivant DiagnosticDescriptor le diagnostic
- location
- Location
Emplacement principal facultatif du diagnostic. Si la valeur est null, Location retourne None.
- messageArgs
- Object[]
Arguments du message du diagnostic
Retours
Instance Diagnostic.
S’applique à
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
- Source:
- Diagnostic.cs
Crée une instance 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
Paramètres
- descriptor
- DiagnosticDescriptor
DiagnosticDescriptor décrivant le diagnostic.
- location
- Location
Emplacement principal facultatif du diagnostic. Si la valeur est null, Location retourne None.
- additionalLocations
- IEnumerable<Location>
Ensemble facultatif d’emplacements supplémentaires liés au diagnostic. En règle générale, il s’agit d’emplacements d’autres éléments référencés dans le message. Si la valeur est null, AdditionalLocations retourne une liste vide.
- messageArgs
- Object[]
Arguments du message du diagnostic.
Retours
Instance Diagnostic.
S’applique à
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
- Source:
- Diagnostic.cs
Crée une instance 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
Paramètres
- descriptor
- DiagnosticDescriptor
DiagnosticDescriptor décrivant le diagnostic.
- location
- Location
Emplacement principal facultatif du diagnostic. Si la valeur est null, Location retourne None.
- properties
- ImmutableDictionary<String,String>
Ensemble facultatif de paires nom-valeur au moyen duquel l’analyseur qui crée le diagnostic peut transmettre des informations plus détaillées au fixateur. Si la valeur est null, Properties retourne Empty.
- messageArgs
- Object[]
Arguments du message du diagnostic.
Retours
Instance Diagnostic.
S’applique à
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
- Source:
- Diagnostic.cs
Crée une instance 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
Paramètres
- descriptor
- DiagnosticDescriptor
DiagnosticDescriptor décrivant le diagnostic.
- location
- Location
Emplacement principal facultatif du diagnostic. Si la valeur est null, Location retourne None.
- additionalLocations
- IEnumerable<Location>
Ensemble facultatif d’emplacements supplémentaires liés au diagnostic. En règle générale, il s’agit d’emplacements d’autres éléments référencés dans le message. Si la valeur est null, AdditionalLocations retourne une liste vide.
- properties
- ImmutableDictionary<String,String>
Ensemble facultatif de paires nom-valeur au moyen duquel l’analyseur qui crée le diagnostic peut transmettre des informations plus détaillées au fixateur. Si la valeur est null, Properties retourne Empty.
- messageArgs
- Object[]
Arguments du message du diagnostic.
Retours
Instance Diagnostic.
S’applique à
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
- Source:
- Diagnostic.cs
Crée une instance 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
Paramètres
- descriptor
- DiagnosticDescriptor
DiagnosticDescriptor décrivant le diagnostic.
- location
- Location
Emplacement principal facultatif du diagnostic. Si la valeur est null, Location retourne None.
- effectiveSeverity
- DiagnosticSeverity
Gravité effective du diagnostic.
- additionalLocations
- IEnumerable<Location>
Ensemble facultatif d’emplacements supplémentaires liés au diagnostic. En règle générale, il s’agit d’emplacements d’autres éléments référencés dans le message. Si la valeur est null, AdditionalLocations retourne une liste vide.
- properties
- ImmutableDictionary<String,String>
Ensemble facultatif de paires nom-valeur au moyen duquel l’analyseur qui crée le diagnostic peut transmettre des informations plus détaillées au fixateur. Si la valeur est null, Properties retourne Empty.
- messageArgs
- Object[]
Arguments du message du diagnostic.
Retours
Instance Diagnostic.
S’applique à
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
- Source:
- Diagnostic.cs
Crée un Diagnostic instance localisable.
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
Paramètres
- id
- String
Identificateur du diagnostic. Pour diagnostics généré par le compilateur, il s’agit d’un code numérique avec un préfixe tel que « CS1001 ».
- category
- String
Catégorie du diagnostic. Pour diagnostics généré par le compilateur, la catégorie sera « Compilateur ».
- message
- LocalizableString
Texte du message de diagnostic.
- severity
- DiagnosticSeverity
Gravité effective du diagnostic.
- defaultSeverity
- DiagnosticSeverity
Gravité par défaut du diagnostic.
- isEnabledByDefault
- Boolean
True si le diagnostic est activé par défaut
- title
- LocalizableString
Titre localisable facultatif décrivant le diagnostic.
- description
- LocalizableString
Description facultative plus longue et localisable pour le diagnostic.
- helpLink
- String
Lien hypertexte facultatif qui fournit des informations plus détaillées sur le diagnostic.
- location
- Location
Emplacement principal facultatif du diagnostic. Si la valeur est null, Location retourne None.
- additionalLocations
- IEnumerable<Location>
Ensemble facultatif d’emplacements supplémentaires liés au diagnostic. En règle générale, il s’agit d’emplacements d’autres éléments référencés dans le message. Si la valeur est null, AdditionalLocations retourne une liste vide.
- customTags
- IEnumerable<String>
Ensemble facultatif de balises personnalisées pour le diagnostic. Consultez WellKnownDiagnosticTags pour obtenir des balises bien connues. Si la valeur est null, Microsoft.CodeAnalysis.Diagnostic.CustomTags retourne une liste vide.
- properties
- ImmutableDictionary<String,String>
Ensemble facultatif de paires nom-valeur au moyen duquel l’analyseur qui crée le diagnostic peut transmettre des informations plus détaillées au fixateur. Si la valeur est null, Properties retourne Empty.
Retours
Instance Diagnostic.
S’applique à
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
- Source:
- Diagnostic.cs
Crée un Diagnostic instance localisable.
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
Paramètres
- id
- String
Identificateur du diagnostic. Pour diagnostics généré par le compilateur, il s’agit d’un code numérique avec un préfixe tel que « CS1001 ».
- category
- String
Catégorie du diagnostic. Pour diagnostics généré par le compilateur, la catégorie sera « Compilateur ».
- message
- LocalizableString
Texte du message de diagnostic.
- severity
- DiagnosticSeverity
Gravité effective du diagnostic.
- defaultSeverity
- DiagnosticSeverity
Gravité par défaut du diagnostic.
- isEnabledByDefault
- Boolean
True si le diagnostic est activé par défaut
- isSuppressed
- Boolean
Indicateur indiquant si le diagnostic est supprimé par une suppression de source.
- title
- LocalizableString
Titre localisable facultatif décrivant le diagnostic.
- description
- LocalizableString
Description facultative plus longue et localisable pour le diagnostic.
- helpLink
- String
Lien hypertexte facultatif qui fournit des informations plus détaillées sur le diagnostic.
- location
- Location
Emplacement principal facultatif du diagnostic. Si la valeur est null, Location retourne None.
- additionalLocations
- IEnumerable<Location>
Ensemble facultatif d’emplacements supplémentaires liés au diagnostic. En règle générale, il s’agit d’emplacements d’autres éléments référencés dans le message. Si la valeur est null, AdditionalLocations retourne une liste vide.
- customTags
- IEnumerable<String>
Ensemble facultatif de balises personnalisées pour le diagnostic. Consultez WellKnownDiagnosticTags pour obtenir des balises bien connues. Si la valeur est null, Microsoft.CodeAnalysis.Diagnostic.CustomTags retourne une liste vide.
- properties
- ImmutableDictionary<String,String>
Ensemble facultatif de paires nom-valeur au moyen duquel l’analyseur qui crée le diagnostic peut transmettre des informations plus détaillées au fixateur. Si la valeur est null, Properties retourne Empty.
Retours
Instance Diagnostic.