AssemblyDelaySignAttribute Klasa

Definicja

Określa, że zestaw nie jest w pełni podpisany podczas tworzenia.

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
Dziedziczenie
AssemblyDelaySignAttribute
Atrybuty

Przykłady

W poniższym przykładzie kodu pokazano użycie atrybutu AssemblyDelaySignAttribute z .AssemblyKeyFileAttribute Aby skompilować ten przykład, należy utworzyć plik klucza o silnej nazwie o nazwie TestPublicKey.snk przy użyciu Sn.exe (strong name tool):

sn -k TestPublicKey.snk   

Skompiluj przykład jako .dll. Jeśli skompilujesz z wiersza polecenia, użyj /t:library opcji dla języka C# lub Visual Basic lub /LD opcji konsolidatora dla języka Visual C++.

using namespace System;
using namespace System::Reflection;

[assembly:AssemblyKeyFileAttribute("TestPublicKey.snk")];
[assembly:AssemblyDelaySignAttribute(true)];

namespace DelaySign
{
    public ref class Test { };
}
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

Uwagi

Gdy ten atrybut jest używany w zestawie, miejsce jest zarezerwowane dla podpisu, który jest później wypełniany przez narzędzie podpisywania, takie jak narzędzie Sn.exe. Opóźnione podpisywanie jest używane, gdy autor zestawu nie ma dostępu do klucza prywatnego, który będzie używany do generowania podpisu, jak w pliku [assembly:AssemblyDelaySignAttribute(true)].

Klasy w programie System.Runtime.CompilerServices są przeznaczone tylko do użytku przez kompilatory. Nie używaj ich, chyba że kompilujesz kompilator.

Aby uzyskać więcej informacji, zobacz dokumentację infrastruktury języka wspólnego (CLI), szczególnie "Partition II: Metadata Definition and Semantics" (Partycja II: definicja metadanych i semantyka).

Konstruktory

AssemblyDelaySignAttribute(Boolean)

Inicjuje nowe wystąpienie klasy AssemblyDelaySignAttribute.

Właściwości

DelaySign

Pobiera wartość wskazującą stan atrybutu.

TypeId

Po zaimplementowaniu w klasie pochodnej pobiera unikatowy identyfikator dla tego Attributeelementu .

(Odziedziczone po Attribute)

Metody

Equals(Object)

Zwraca wartość wskazującą, czy to wystąpienie jest równe podanemu obiektowi.

(Odziedziczone po Attribute)
GetHashCode()

Zwraca wartość skrótu dla tego wystąpienia.

(Odziedziczone po Attribute)
GetType()

Type Pobiera wartość bieżącego wystąpienia.

(Odziedziczone po Object)
IsDefaultAttribute()

W przypadku zastąpienia w klasie pochodnej wskazuje, czy wartość tego wystąpienia jest wartością domyślną klasy pochodnej.

(Odziedziczone po Attribute)
Match(Object)

Po przesłonięciu w klasie pochodnej zwraca wartość wskazującą, czy to wystąpienie jest równe określonemu obiektowi.

(Odziedziczone po Attribute)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)

Jawne implementacje interfejsu

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Zestaw nazw jest mapowany na odpowiedni zestaw identyfikatorów wysyłania.

(Odziedziczone po Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Pobiera informacje o typie dla obiektu, który może służyć do pobierania informacji o typie dla interfejsu.

(Odziedziczone po Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Pobiera informację o liczbie typów interfejsów, jakie zawiera obiekt (0 lub 1).

(Odziedziczone po Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Umożliwia dostęp do właściwości i metod udostępnianych przez obiekt.

(Odziedziczone po Attribute)

Dotyczy

Zobacz też