AssemblyDelaySignAttribute Classe
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Specifica che l'assembly non è completamente firmato al momento della creazione.
public ref class AssemblyDelaySignAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, Inherited=false)]
public sealed class AssemblyDelaySignAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false)]
public sealed class AssemblyDelaySignAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class AssemblyDelaySignAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, Inherited=false)>]
type AssemblyDelaySignAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false)>]
type AssemblyDelaySignAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, Inherited=false)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type AssemblyDelaySignAttribute = class
inherit Attribute
Public NotInheritable Class AssemblyDelaySignAttribute
Inherits Attribute
- Ereditarietà
- Attributi
Esempio
Nell'esempio di codice seguente viene illustrato l'uso dell'attributo AssemblyDelaySignAttribute con .AssemblyKeyFileAttribute Per compilare questo esempio, è necessario creare un file di chiave con nome sicuro denominato TestPublicKey.snk usando il Sn.exe (Strumento nome sicuro):
sn -k TestPublicKey.snk
Compilare l'esempio come .dll. Se si esegue la compilazione dalla riga di comando, usare l'opzione /t:library .
using System;
using System.Reflection;
[assembly:AssemblyKeyFileAttribute("TestPublicKey.snk")]
[assembly:AssemblyDelaySignAttribute(true)]
namespace DelaySign
{
public class Test { }
}
Imports System.Reflection
<assembly:AssemblyDelaySignAttribute(true)>
<assembly:AssemblyKeyFileAttribute("TestPublicKey.snk")>
Namespace DelaySign
Public class Test
End Class
End Namespace
Commenti
Quando questo attributo viene usato in un assembly, lo spazio viene riservato per la firma, che viene successivamente riempito da uno strumento di firma, ad esempio l'utilità Sn.exe. La firma ritardata viene usata quando l'autore dell'assembly non ha accesso alla chiave privata che verrà usata per generare la firma, come in [assembly:AssemblyDelaySignAttribute(true)].
Le classi in System.Runtime.CompilerServices sono destinate solo ai compilatori. Non usarle a meno che non si stia creando un compilatore.
Per altre informazioni, vedere la documentazione di Common Language Infrastructure (CLI), in particolare "Partition II: Metadata Definition and Semantics".
Costruttori
| Nome | Descrizione |
|---|---|
| AssemblyDelaySignAttribute(Boolean) |
Inizializza una nuova istanza della classe AssemblyDelaySignAttribute. |
Proprietà
| Nome | Descrizione |
|---|---|
| DelaySign |
Ottiene un valore che indica lo stato dell'attributo. |
| TypeId |
Se implementato in una classe derivata, ottiene un identificatore univoco per questo Attribute. (Ereditato da Attribute) |
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) |
Implementazioni dell'interfaccia esplicita
| Nome | Descrizione |
|---|---|
| _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) |
Esegue il mapping di un set di nomi a un set corrispondente di identificatori dispatch. (Ereditato da Attribute) |
| _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) |
Recupera le informazioni sul tipo per un oggetto, che può essere utilizzato per ottenere le informazioni sul tipo per un'interfaccia. (Ereditato da Attribute) |
| _Attribute.GetTypeInfoCount(UInt32) |
Recupera il numero di interfacce di informazioni sul tipo fornite da un oggetto (0 o 1). (Ereditato da Attribute) |
| _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) |
Fornisce l'accesso alle proprietà e ai metodi esposti da un oggetto . (Ereditato da Attribute) |