ExperimentalAttribute Classe

Definizione

Indica che un'API è sperimentale e che potrebbe cambiare in futuro.

public ref class ExperimentalAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)]
public sealed class ExperimentalAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)>]
type ExperimentalAttribute = class
    inherit Attribute
Public NotInheritable Class ExperimentalAttribute
Inherits Attribute
Ereditarietà
ExperimentalAttribute
Attributi

Commenti

ExperimentalAttribute consente di contrassegnare i siti di chiamata con una diagnostica che indica che viene usata una funzionalità sperimentale. È possibile usare questo attributo per distribuire le funzionalità di anteprima in librerie altrimenti stabili.

Per altre informazioni sul contrassegno delle API come anteprima, vedere API di anteprima.

Costruttori

Nome Descrizione
ExperimentalAttribute(String)

Inizializza una nuova istanza della ExperimentalAttribute classe , specificando l'ID che verrà usato dal compilatore quando si segnala un uso dell'API a cui si applica l'attributo .

Proprietà

Nome Descrizione
DiagnosticId

Ottiene l'ID che il compilatore userà quando si segnala un uso dell'API a cui si applica l'attributo .

Message

Ottiene o imposta un messaggio facoltativo associato all'attributo sperimentale.

TypeId

Se implementato in una classe derivata, ottiene un identificatore univoco per questo Attribute.

(Ereditato da Attribute)
UrlFormat

Ottiene o imposta l'URL per la documentazione corrispondente. L'API accetta una stringa di formato anziché un URL effettivo, creando un URL generico che include l'ID di diagnostica.

Metodi

Nome Descrizione
Equals(Object)

Restituisce un valore che indica se questa istanza è uguale a un oggetto specificato.

(Ereditato da Attribute)
GetHashCode()

Restituisce il codice hash per questa istanza.

(Ereditato da Attribute)
GetType()

Ottiene il Type dell'istanza corrente.

(Ereditato da Object)
IsDefaultAttribute()

Quando sottoposto a override in una classe derivata, indica se il valore di questa istanza è il valore predefinito per la classe derivata.

(Ereditato da Attribute)
Match(Object)

Quando sottoposto a override in una classe derivata, restituisce un valore che indica se questa istanza è uguale a un oggetto specificato.

(Ereditato da Attribute)
MemberwiseClone()

Crea una copia superficiale del Objectcorrente.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)

Si applica a

Vedi anche