ZoneIdentityPermissionAttribute Класс

Определение

Внимание!

Code Access Security is not supported or honored by the runtime.

Разрешает применять меры безопасности для ZoneIdentityPermission к коду с помощью декларативной безопасности. Этот класс не наследуется.

public ref class ZoneIdentityPermissionAttribute sealed : System::Security::Permissions::CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed class ZoneIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[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 sealed class ZoneIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
public sealed class ZoneIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[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 sealed class ZoneIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type ZoneIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
[<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 ZoneIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Serializable>]
type ZoneIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
[<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 ZoneIdentityPermissionAttribute = class
    inherit CodeAccessSecurityAttribute
Public NotInheritable Class ZoneIdentityPermissionAttribute
Inherits CodeAccessSecurityAttribute
Наследование
Атрибуты

Комментарии

Важно!

Частично доверенный код больше не поддерживается. Этот атрибут не действует в .NET Core.

Область допустимого объявления зависит от используемого SecurityAction .

Важно!

Начиная с платформа .NET Framework 4 разрешения удостоверений не используются.

В платформа .NET Framework версии 1.0 и 1.1 требования к разрешениям удостоверений эффективны, даже если вызывающая сборка полностью доверяет. То есть, хотя вызывающая сборка имеет полное доверие, запрос на разрешение удостоверения завершается ошибкой, если сборка не соответствует требуемым критериям. В платформа .NET Framework версии 2.0 требования к разрешениям удостоверений неэффективны, если вызывающая сборка имеет полное доверие. Это обеспечивает согласованность для всех разрешений, устраняя обращение с разрешениями удостоверения как особый случай.

Сведения о безопасности, объявленные атрибутом безопасности, хранятся в метаданных целевого объекта атрибута и обращаются к системе во время выполнения. Атрибуты безопасности используются только для декларативной безопасности. Для императивной безопасности используйте соответствующий класс разрешений.

Конструкторы

ZoneIdentityPermissionAttribute(SecurityAction)

Инициализирует новый экземпляр класса ZoneIdentityPermissionAttribute указанным значением SecurityAction.

Свойства

Action

Возвращает или задает действие по обеспечению безопасности.

(Унаследовано от SecurityAttribute)
TypeId

В случае реализации в производном классе возвращает уникальный идентификатор для этого атрибута Attribute.

(Унаследовано от Attribute)
Unrestricted

Возвращает или задает значение, определяющее, объявлено ли полное (неограниченное) разрешение доступа к ресурсу, защищенному атрибутом.

(Унаследовано от SecurityAttribute)
Zone

Получает и задает членство в зоне содержимого, заданной значением свойства.

Методы

CreatePermission()

Создает и возвращает новый объект ZoneIdentityPermission.

Equals(Object)

Возвращает значение, показывающее, равен ли экземпляр указанному объекту.

(Унаследовано от Attribute)
GetHashCode()

Возвращает хэш-код данного экземпляра.

(Унаследовано от Attribute)
GetType()

Возвращает объект Type для текущего экземпляра.

(Унаследовано от Object)
IsDefaultAttribute()

При переопределении в производном классе указывает, является ли значение этого экземпляра значением по умолчанию для производного класса.

(Унаследовано от Attribute)
Match(Object)

При переопределении в производном классе возвращает значение, указывающее, является ли этот экземпляр равным заданному объекту.

(Унаследовано от Attribute)
MemberwiseClone()

Создает неполную копию текущего объекта Object.

(Унаследовано от Object)
ToString()

Возвращает строку, представляющую текущий объект.

(Унаследовано от Object)

Явные реализации интерфейса

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

Сопоставляет набор имен соответствующему набору идентификаторов диспетчеризации.

(Унаследовано от Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Возвращает сведения о типе объекта, которые можно использовать для получения сведений о типе интерфейса.

(Унаследовано от Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Возвращает количество предоставляемых объектом интерфейсов для доступа к сведениям о типе (0 или 1).

(Унаследовано от Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Предоставляет доступ к открытым свойствам и методам объекта.

(Унаследовано от Attribute)

Применяется к

См. также раздел