79 lines
2.9 KiB
C#
79 lines
2.9 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.Security.Permissions
|
|
{
|
|
/// <summary>Allows security actions for <see cref="T:System.Security.Permissions.UIPermission" /> to be applied to code using declarative security. This class cannot be inherited.</summary>
|
|
// Token: 0x02000572 RID: 1394
|
|
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public sealed class UIPermissionAttribute : CodeAccessSecurityAttribute
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Permissions.UIPermissionAttribute" /> class with the specified <see cref="T:System.Security.Permissions.SecurityAction" />.</summary>
|
|
/// <param name="action">One of the <see cref="T:System.Security.Permissions.SecurityAction" /> values. </param>
|
|
// Token: 0x0600330A RID: 13066 RVA: 0x000AFC5C File Offset: 0x000ADE5C
|
|
public UIPermissionAttribute(SecurityAction action)
|
|
: base(action)
|
|
{
|
|
}
|
|
|
|
/// <summary>Gets or sets the type of access to the clipboard that is permitted.</summary>
|
|
/// <returns>One of the <see cref="T:System.Security.Permissions.UIPermissionClipboard" /> values.</returns>
|
|
// Token: 0x17000A08 RID: 2568
|
|
// (get) Token: 0x0600330B RID: 13067 RVA: 0x000AFC68 File Offset: 0x000ADE68
|
|
// (set) Token: 0x0600330C RID: 13068 RVA: 0x000AFC70 File Offset: 0x000ADE70
|
|
public UIPermissionClipboard Clipboard
|
|
{
|
|
get
|
|
{
|
|
return this.clipboard;
|
|
}
|
|
set
|
|
{
|
|
this.clipboard = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the type of access to the window resources that is permitted.</summary>
|
|
/// <returns>One of the <see cref="T:System.Security.Permissions.UIPermissionWindow" /> values.</returns>
|
|
// Token: 0x17000A09 RID: 2569
|
|
// (get) Token: 0x0600330D RID: 13069 RVA: 0x000AFC7C File Offset: 0x000ADE7C
|
|
// (set) Token: 0x0600330E RID: 13070 RVA: 0x000AFC84 File Offset: 0x000ADE84
|
|
public UIPermissionWindow Window
|
|
{
|
|
get
|
|
{
|
|
return this.window;
|
|
}
|
|
set
|
|
{
|
|
this.window = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>Creates and returns a new <see cref="T:System.Security.Permissions.UIPermission" />.</summary>
|
|
/// <returns>A <see cref="T:System.Security.Permissions.UIPermission" /> that corresponds to this attribute.</returns>
|
|
// Token: 0x0600330F RID: 13071 RVA: 0x000AFC90 File Offset: 0x000ADE90
|
|
public override IPermission CreatePermission()
|
|
{
|
|
UIPermission uipermission;
|
|
if (base.Unrestricted)
|
|
{
|
|
uipermission = new UIPermission(PermissionState.Unrestricted);
|
|
}
|
|
else
|
|
{
|
|
uipermission = new UIPermission(this.window, this.clipboard);
|
|
}
|
|
return uipermission;
|
|
}
|
|
|
|
// Token: 0x040014F0 RID: 5360
|
|
private UIPermissionClipboard clipboard;
|
|
|
|
// Token: 0x040014F1 RID: 5361
|
|
private UIPermissionWindow window;
|
|
}
|
|
}
|