SecurityAttribute Klasa
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przestroga
Code Access Security is not supported or honored by the runtime.
Określa klasę atrybutu podstawowego dla zabezpieczeń deklaratywnych, z których CodeAccessSecurityAttribute pochodzi.
public ref class SecurityAttribute abstract : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public abstract class SecurityAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public abstract class SecurityAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
public abstract class SecurityAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class SecurityAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type SecurityAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type SecurityAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Serializable>]
type SecurityAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SecurityAttribute = class
inherit Attribute
Public MustInherit Class SecurityAttribute
Inherits Attribute
- Dziedziczenie
- Pochodne
- Atrybuty
Przestroga
Zabezpieczenia dostępu do kodu (CAS) zostały przestarzałe we wszystkich wersjach .NET Framework i .NET. Najnowsze wersje platformy .NET nie honorują adnotacji CAS i generują błędy, jeśli są używane interfejsy API związane z usługą CAS. Deweloperzy powinni szukać alternatywnych sposobów wykonywania zadań zabezpieczeń.
Po dziedziczeniu z SecurityAttributeprogramu należy zastąpić CreatePermission().
Security |
Przestarzałe.
Inicjuje nowe wystąpienie przy SecurityAttribute użyciu określonego SecurityActionelementu . |
Action |
Przestarzałe.
Pobiera lub ustawia akcję zabezpieczeń. |
Type |
Przestarzałe.
Po zaimplementowaniu w klasie pochodnej pobiera unikatowy identyfikator dla tego elementu Attribute. (Odziedziczone po Attribute) |
Unrestricted |
Przestarzałe.
Pobiera lub ustawia wartość wskazującą, czy zadeklarowane jest pełne (nieograniczone) uprawnienie do zasobu chronionego przez atrybut. |
Create |
Przestarzałe.
Po przesłonięciu w klasie pochodnej tworzy obiekt uprawnień, który następnie można serializować w postaci binarnej i trwale przechowywany wraz z SecurityAction metadanymi zestawu. |
Equals(Object) |
Przestarzałe.
Zwraca wartość wskazującą, czy to wystąpienie jest równe podanemu obiektowi. (Odziedziczone po Attribute) |
Get |
Przestarzałe.
Zwraca wartość skrótu dla tego wystąpienia. (Odziedziczone po Attribute) |
Get |
Przestarzałe.
Type Pobiera bieżące wystąpienie. (Odziedziczone po Object) |
Is |
Przestarzałe.
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) |
Przestarzałe.
W przypadku zastąpienia w klasie pochodnej zwraca wartość wskazującą, czy to wystąpienie jest równe określonemu obiektowi. (Odziedziczone po Attribute) |
Memberwise |
Przestarzałe.
Tworzy płytkią kopię bieżącego Objectelementu . (Odziedziczone po Object) |
To |
Przestarzałe.
Zwraca ciąg reprezentujący bieżący obiekt. (Odziedziczone po Object) |
_Attribute. |
Przestarzałe.
Zestaw nazw jest mapowany na odpowiedni zestaw identyfikatorów wysyłania. (Odziedziczone po Attribute) |
_Attribute. |
Przestarzałe.
Pobiera informacje o typie obiektu, którego można użyć do pobrania informacji o typie interfejsu. (Odziedziczone po Attribute) |
_Attribute. |
Przestarzałe.
Pobiera informację o liczbie typów interfejsów, jakie zawiera obiekt (0 lub 1). (Odziedziczone po Attribute) |
_Attribute. |
Przestarzałe.
Umożliwia dostęp do właściwości i metod udostępnianych przez obiekt. (Odziedziczone po Attribute) |
Produkt | Wersje (Przestarzałe) |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1 (5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Windows Desktop | (5, 6, 7, 8, 9) |
Opinia o produkcie .NET
.NET to projekt typu open source. Wybierz link, aby przekazać opinię: