SecurityTreatAsSafeAttribute Класс

Определение

Внимание

SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Use the SecuritySafeCriticalAttribute instead.

Внимание

SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Please use the SecuritySafeCriticalAttribute instead.

Внимание

SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Use SecuritySafeCriticalAttribute instead.

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

public ref class SecurityTreatAsSafeAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
[System.Obsolete("SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Use the SecuritySafeCriticalAttribute instead.")]
public sealed class SecurityTreatAsSafeAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
[System.Obsolete("SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility.  Please use the SecuritySafeCriticalAttribute instead.")]
public sealed class SecurityTreatAsSafeAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
[System.Obsolete("SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Use SecuritySafeCriticalAttribute instead.")]
public sealed class SecurityTreatAsSafeAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=false, Inherited=false)]
public sealed class SecurityTreatAsSafeAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)>]
[<System.Obsolete("SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Use the SecuritySafeCriticalAttribute instead.")>]
type SecurityTreatAsSafeAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)>]
[<System.Obsolete("SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility.  Please use the SecuritySafeCriticalAttribute instead.")>]
type SecurityTreatAsSafeAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)>]
[<System.Obsolete("SecurityTreatAsSafe is only used for .NET 2.0 transparency compatibility. Use SecuritySafeCriticalAttribute instead.")>]
type SecurityTreatAsSafeAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=false, Inherited=false)>]
type SecurityTreatAsSafeAttribute = class
    inherit Attribute
Public NotInheritable Class SecurityTreatAsSafeAttribute
Inherits Attribute
Наследование
SecurityTreatAsSafeAttribute
Атрибуты

Комментарии

Important

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

Типы или члены, SecurityCriticalAttribute помеченные атрибутом, и SecurityTreatAsSafeAttribute атрибут можно получить к ним по типам и элементам в сборке, помеченным атрибутом SecurityTransparentAttribute .

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

Имя Описание
SecurityTreatAsSafeAttribute()
Устаревшие..
Устаревшие..
Устаревшие..

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

Свойства

Имя Описание
TypeId
Устаревшие..
Устаревшие..
Устаревшие..

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

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

Методы

Имя Описание
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)

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

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