Files
Dec2017-Script-Dump/mscorlib/System/Security/SecurityCriticalAttribute.cs
T
2026-06-04 11:42:34 +02:00

49 lines
2.1 KiB
C#

using System;
namespace System.Security
{
/// <summary>Specifies that code or an assembly performs security-critical operations.</summary>
// Token: 0x020005CB RID: 1483
[MonoTODO("Only supported by the runtime when CoreCLR is enabled")]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
public sealed class SecurityCriticalAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.SecurityCriticalAttribute" /> class with default scope. </summary>
// Token: 0x06003622 RID: 13858 RVA: 0x000B9194 File Offset: 0x000B7394
public SecurityCriticalAttribute()
{
this._scope = SecurityCriticalScope.Explicit;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.SecurityCriticalAttribute" /> class with the specified scope. </summary>
/// <param name="scope">One of the <see cref="T:System.Security.SecurityCriticalScope" /> values that specifies the scope of the attribute. </param>
// Token: 0x06003623 RID: 13859 RVA: 0x000B91A4 File Offset: 0x000B73A4
public SecurityCriticalAttribute(SecurityCriticalScope scope)
{
if (scope != SecurityCriticalScope.Everything)
{
this._scope = SecurityCriticalScope.Explicit;
}
else
{
this._scope = SecurityCriticalScope.Everything;
}
}
/// <summary>Gets the scope for the attribute.</summary>
/// <returns>One of the <see cref="T:System.Security.SecurityCriticalScope" /> values that specifies the scope of the attribute. The default is <see cref="F:System.Security.SecurityCriticalScope.Explicit" />.</returns>
// Token: 0x17000A94 RID: 2708
// (get) Token: 0x06003624 RID: 13860 RVA: 0x000B91E0 File Offset: 0x000B73E0
public SecurityCriticalScope Scope
{
get
{
return this._scope;
}
}
// Token: 0x04001628 RID: 5672
private SecurityCriticalScope _scope;
}
}