Lingua

PreserveAttribute Classe

Definizione

Attenzione

Please use [System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute]

Identifica il codice che i linker Android meno recenti devono mantenere. Questo attributo è obsoleto; I membri con annotazioni possono comunque essere tagliati. Utilizzare invece DynamicDependencyAttribute.

[System.AttributeUsage(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.Property | System.AttributeTargets.Struct)]
[System.Obsolete("Please use [System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute]")]
public sealed class PreserveAttribute : Attribute
[<System.AttributeUsage(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.Property | System.AttributeTargets.Struct)>]
[<System.Obsolete("Please use [System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute]")>]
type PreserveAttribute = class
    inherit Attribute
Ereditarietà
PreserveAttribute
Attributi

Costruttori

Nome Descrizione
PreserveAttribute()
Obsoleti.

Inizializza una nuova istanza di questo attributo obsoleto.

Campi

Nome Descrizione
AllMembers
Obsoleti.

Se impostato su true su su su un tipo, i linker Android precedenti usavano questo campo per mantenere i campi e i metodi del tipo. Questo attributo obsoleto non garantisce più la conservazione.

Conditional
Obsoleti.

Se impostato su true su su su un metodo, i linker Android precedenti hanno mantenuto il metodo quando il tipo dichiarante è stato mantenuto, senza forzare il tipo dichiarante da conservare. Questo attributo obsoleto non garantisce più la conservazione.

Si applica a