当前位置: 首页>>代码示例>>C#>>正文


C# RegistryPermission.IsUnrestricted方法代码示例

本文整理汇总了C#中System.Security.Permissions.RegistryPermission.IsUnrestricted方法的典型用法代码示例。如果您正苦于以下问题:C# RegistryPermission.IsUnrestricted方法的具体用法?C# RegistryPermission.IsUnrestricted怎么用?C# RegistryPermission.IsUnrestricted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Security.Permissions.RegistryPermission的用法示例。


在下文中一共展示了RegistryPermission.IsUnrestricted方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PermissionStateUnrestricted

		public void PermissionStateUnrestricted ()
		{
			RegistryPermission ep = new RegistryPermission (PermissionState.Unrestricted);
			Assert.IsNotNull (ep, "RegistryPermission(PermissionState.Unrestricted)");
			Assert.IsTrue (ep.IsUnrestricted (), "IsUnrestricted");
			RegistryPermission copy = (RegistryPermission)ep.Copy ();
			Assert.AreEqual (ep.IsUnrestricted (), copy.IsUnrestricted (), "Copy.IsUnrestricted");
			SecurityElement se = ep.ToXml ();
			Assert.AreEqual ("true", se.Attribute ("Unrestricted"), "ToXml-Unrestricted");
		}
开发者ID:RobertZenz,项目名称:mono,代码行数:10,代码来源:RegistryPermissionTest.cs

示例2: PermissionStateUnrestricted

		public void PermissionStateUnrestricted ()
		{
			RegistryPermission ep = new RegistryPermission (PermissionState.Unrestricted);
			AssertNotNull ("RegistryPermission(PermissionState.Unrestricted)", ep);
			Assert ("IsUnrestricted", ep.IsUnrestricted ());
			RegistryPermission copy = (RegistryPermission)ep.Copy ();
			AssertEquals ("Copy.IsUnrestricted", ep.IsUnrestricted (), copy.IsUnrestricted ());
			SecurityElement se = ep.ToXml ();
			AssertEquals ("ToXml-Unrestricted", "true", se.Attribute ("Unrestricted"));
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:10,代码来源:RegistryPermissionTest.cs

示例3: PermissionStateNone

		public void PermissionStateNone ()
		{
			RegistryPermission ep = new RegistryPermission (PermissionState.None);
			Assert.IsNotNull (ep, "RegistryPermission(PermissionState.None)");
			Assert.IsTrue (!ep.IsUnrestricted (), "IsUnrestricted");
			RegistryPermission copy = (RegistryPermission)ep.Copy ();
			Assert.AreEqual (ep.IsUnrestricted (), copy.IsUnrestricted (), "Copy.IsUnrestricted");
			SecurityElement se = ep.ToXml ();
			Assert.IsTrue (se.Attribute ("class").StartsWith (className), "ToXml-class");
			Assert.AreEqual ("1", se.Attribute ("version"), "ToXml-version");
		}
开发者ID:RobertZenz,项目名称:mono,代码行数:11,代码来源:RegistryPermissionTest.cs

示例4: PermissionStateNone

		public void PermissionStateNone ()
		{
			RegistryPermission ep = new RegistryPermission (PermissionState.None);
			AssertNotNull ("RegistryPermission(PermissionState.None)", ep);
			Assert ("IsUnrestricted", !ep.IsUnrestricted ());
			RegistryPermission copy = (RegistryPermission)ep.Copy ();
			AssertEquals ("Copy.IsUnrestricted", ep.IsUnrestricted (), copy.IsUnrestricted ());
			SecurityElement se = ep.ToXml ();
			Assert ("ToXml-class", se.Attribute ("class").StartsWith (className));
			AssertEquals ("ToXml-version", "1", se.Attribute ("version"));
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:11,代码来源:RegistryPermissionTest.cs

示例5: ReadAccess

		public void ReadAccess ()
		{
			RegistryPermission ep = new RegistryPermission (RegistryPermissionAccess.Read, keyLocalMachine);
			Assert.IsTrue (!ep.IsUnrestricted (), "IsUnrestricted");
		}
开发者ID:RobertZenz,项目名称:mono,代码行数:5,代码来源:RegistryPermissionTest.cs

示例6: CreateAccess

		public void CreateAccess ()
		{
			RegistryPermission ep = new RegistryPermission (RegistryPermissionAccess.Create, keyLocalMachine);
			Assert ("IsUnrestricted", !ep.IsUnrestricted ());
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:5,代码来源:RegistryPermissionTest.cs


注:本文中的System.Security.Permissions.RegistryPermission.IsUnrestricted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。