Exemple #1
0
        public void Unrestricted()
        {
            UIPermissionAttribute a = new UIPermissionAttribute(SecurityAction.Assert);

            a.Unrestricted = true;
            UIPermission perm = (UIPermission)a.CreatePermission();

            Assert.AreEqual(UIPermissionClipboard.AllClipboard, perm.Clipboard, "Unrestricted-Clipboard");
            Assert.AreEqual(UIPermissionWindow.AllWindows, perm.Window, "Unrestricted-Window");
        }
Exemple #2
0
        public void Default()
        {
            UIPermissionAttribute a = new UIPermissionAttribute(SecurityAction.Assert);

            Assert.AreEqual(UIPermissionClipboard.NoClipboard, a.Clipboard, "Clipboard");
            Assert.AreEqual(UIPermissionWindow.NoWindows, a.Window, "Window");
            Assert.AreEqual(a.ToString(), a.TypeId.ToString(), "TypeId");
            Assert.IsFalse(a.Unrestricted, "Unrestricted");

            UIPermission perm = (UIPermission)a.CreatePermission();

            Assert.AreEqual(UIPermissionClipboard.NoClipboard, perm.Clipboard, "CreatePermission-Clipboard");
            Assert.AreEqual(UIPermissionWindow.NoWindows, perm.Window, "CreatePermission-Window");
        }
Exemple #3
0
 public static void UIPermissionAttributeCallMethods()
 {
     UIPermissionAttribute uipa = new UIPermissionAttribute(new Permissions.SecurityAction());
     IPermission ip = uipa.CreatePermission();
 }
Exemple #4
0
 public static void UIPermissionAttributeCallMethods()
 {
     UIPermissionAttribute uipa = new UIPermissionAttribute(new Permissions.SecurityAction());
     IPermission           ip   = uipa.CreatePermission();
 }