• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# PermissionState类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PermissionState的典型用法代码示例。如果您正苦于以下问题:C# PermissionState类的具体用法?C# PermissionState怎么用?C# PermissionState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PermissionState类属于命名空间,在下文中一共展示了PermissionState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1:

	internal IsolatedStoragePermission
					(IsolatedStoragePermissionAttribute copyFrom)
			{
				this.state = PermissionState.None;
				this.userQuota = copyFrom.userQuota;
				this.usageAllowed = copyFrom.usageAllowed;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:IsolatedStoragePermission.cs


示例2: RegistryPermission

	public RegistryPermission(RegistryPermissionAccess flag, String pathList)
			{
				if(pathList == null)
				{
					throw new ArgumentNullException("pathList");
				}
				if((flag & ~(RegistryPermissionAccess.AllAccess)) != 0)
				{
					throw new ArgumentException(_("Arg_RegistryAccess"));
				}
				this.state = PermissionState.None;
				String[] split = EnvironmentPermission.SplitPath(pathList);
				if((flag & RegistryPermissionAccess.Read) != 0)
				{
					readList = split;
				}
				if((flag & RegistryPermissionAccess.Write) != 0)
				{
					writeList = split;
				}
				if((flag & RegistryPermissionAccess.Create) != 0)
				{
					createList = split;
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:25,代码来源:RegistryPermission.cs


示例3: PerformanceCounterPermission

	public PerformanceCounterPermission(PermissionState state)
			: base(state)
			{
				PermissionAccessType =
					typeof(PerformanceCounterPermissionAccess);
				TagNames = new String [] {"Machine", "Category"};
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:PerformanceCounterPermission.cs


示例4: UIPermission

		// Constructors

		public UIPermission (PermissionState state) 
		{
			if (CheckPermissionState (state, true) == PermissionState.Unrestricted) {
				_clipboard = UIPermissionClipboard.AllClipboard;
				_window = UIPermissionWindow.AllWindows;
			}
		}
开发者ID:jack-pappas,项目名称:mono,代码行数:9,代码来源:UIPermission.cs


示例5: IsolatedStoragePermission

		public IsolatedStoragePermission (PermissionState state)
#endif
		{
			if (CheckPermissionState (state, true) == PermissionState.Unrestricted) {
				UsageAllowed = IsolatedStorageContainment.UnrestrictedIsolatedStorage;
			}
		}
开发者ID:runefs,项目名称:Marvin,代码行数:7,代码来源:IsolatedStoragePermission.cs


示例6: ZoneIdentityPermission

		public ZoneIdentityPermission (PermissionState state)
		{
			// false == do not allow Unrestricted for Identity Permissions
			CheckPermissionState (state, false);
			// default values
			zone = SecurityZone.NoZone;
		}
开发者ID:jack-pappas,项目名称:mono,代码行数:7,代码来源:ZoneIdentityPermission.cs


示例7: FromXml

	// Convert an XML value into a permissions value.
	public override void FromXml(SecurityElement esd)
			{
				String value;
				if(esd == null)
				{
					throw new ArgumentNullException("esd");
				}
				if(esd.Attribute("version") != "1")
				{
					throw new ArgumentException(S._("Arg_PermissionVersion"));
				}
				value = esd.Attribute("Unrestricted");
				if(value != null && Boolean.Parse(value))
				{
					state = PermissionState.Unrestricted;
				}
				else
				{
					state = PermissionState.None;
				}
				value = esd.Attribute("Level");
				if(value != null)
				{
					level = (PrintingPermissionLevel)
						Enum.Parse(typeof(PrintingPermissionLevel), value);
				}
				else
				{
					level = PrintingPermissionLevel.NoPrinting;
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:32,代码来源:PrintingPermission.cs


示例8: FileIOPermission

	public FileIOPermission(FileIOPermissionAccess flag, String pathList)
			{
				if(pathList == null)
				{
					throw new ArgumentNullException("pathList");
				}
				if((flag & ~(FileIOPermissionAccess.AllAccess)) != 0)
				{
					throw new ArgumentException(_("Arg_FileIOAccess"));
				}
				this.state = PermissionState.None;
				String[] split = EnvironmentPermission.SplitPath(pathList);
				if((flag & FileIOPermissionAccess.Read) != 0)
				{
					readList = split;
				}
				if((flag & FileIOPermissionAccess.Write) != 0)
				{
					writeList = split;
				}
				if((flag & FileIOPermissionAccess.Append) != 0)
				{
					appendList = split;
				}
				if((flag & FileIOPermissionAccess.PathDiscovery) != 0)
				{
					discoveryList = split;
				}
				allLocalFiles = FileIOPermissionAccess.NoAccess;
				allFiles = FileIOPermissionAccess.NoAccess;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:31,代码来源:FileIOPermission.cs


示例9: EnvironmentPermission

	internal EnvironmentPermission(PermissionState state, String[] readList,
								   String[] writeList)
			{
				this.state = state;
				this.readList = readList;
				this.writeList = writeList;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:EnvironmentPermission.cs


示例10: IngresPermission

        /// <summary>
        /// Creates a new instance of IngresPermission.
        /// </summary>
        /// <param name="state">
        /// PermissionState for access to all or no resources.</param>
        /// <param name="allowBlankPassword"></param>
        public IngresPermission(
				PermissionState state,
				bool allowBlankPassword)
            : base(state)
        {
            this.AllowBlankPassword = allowBlankPassword;
        }
开发者ID:JordanChin,项目名称:Ingres,代码行数:13,代码来源:permission.cs


示例11: StorePermission

		public StorePermission (PermissionState state)
		{
			if (PermissionHelper.CheckPermissionState (state, true) == PermissionState.Unrestricted)
				_flags = StorePermissionFlags.AllFlags;
			else
				_flags = StorePermissionFlags.NoFlags;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:StorePermission.cs


示例12: SecurityPermission

		// constructors

		public SecurityPermission (PermissionState state)
		{
			if (CheckPermissionState (state, true) == PermissionState.Unrestricted)
				flags = SecurityPermissionFlag.AllFlags;
			else
				flags = SecurityPermissionFlag.NoFlags;
		}
开发者ID:runefs,项目名称:Marvin,代码行数:9,代码来源:SecurityPermission.cs


示例13: FromXml

	// Convert an XML value into a permissions value.
	public override void FromXml(SecurityElement esd)
			{
				String value;
				if(esd == null)
				{
					throw new ArgumentNullException("esd");
				}
				if(esd.Attribute("version") != "1")
				{
					throw new ArgumentException(_("Arg_PermissionVersion"));
				}
				value = esd.Attribute("Unrestricted");
				if(value != null && Boolean.Parse(value))
				{
					state = PermissionState.Unrestricted;
				}
				else
				{
					state = PermissionState.None;
				}
				value = esd.Attribute("Access");
				if(value != null)
				{
					flags = (FileDialogPermissionAccess)
						Enum.Parse(typeof(FileDialogPermissionAccess), value);
				}
				else
				{
					flags = FileDialogPermissionAccess.None;
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:32,代码来源:FileDialogPermission.cs


示例14: ReflectionPermission

		public ReflectionPermission (PermissionState state)
		{
			if (CheckPermissionState (state, true) == PermissionState.Unrestricted)
				flags = ReflectionPermissionFlag.AllFlags;
			else
				flags = ReflectionPermissionFlag.NoFlags;
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:7,代码来源:ReflectionPermission.cs


示例15: RegistryPermission

//		private AccessControlActions _control;
#endif
		// Constructors

		public RegistryPermission (PermissionState state)
		{
			_state = CheckPermissionState (state, true);
			createList = new ArrayList ();
			readList = new ArrayList ();
			writeList = new ArrayList ();
		}
开发者ID:runefs,项目名称:Marvin,代码行数:11,代码来源:RegistryPermission.cs


示例16: SybasePermission

		public SybasePermission (PermissionState state, bool allowBlankPassword) 
#if NET_2_0
			: base (PermissionState.None)
#endif
		{ 
			throw new NotImplementedException ();
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:SybasePermission.cs


示例17: MessageQueuePermission

 /// <include file='doc\MessageQueuePermission.uex' path='docs/doc[@for="MessageQueuePermission.MessageQueuePermission1"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public MessageQueuePermission(PermissionState state)
 {
     if (state == PermissionState.Unrestricted)
         this.isUnrestricted = true;
     else
         this.isUnrestricted = false;
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:11,代码来源:MessageQueuePermission.cs


示例18: GacIdentityPermission

        //------------------------------------------------------
        // 
        // PUBLIC CONSTRUCTORS
        // 
        //----------------------------------------------------- 

        public GacIdentityPermission(PermissionState state) 
        {
            if (state != PermissionState.Unrestricted && state != PermissionState.None)
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_InvalidPermissionState")); 
            }
        } 
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:13,代码来源:GACIdentityPermission.cs


示例19: DataProtectionPermission

		public DataProtectionPermission (PermissionState state)
		{
			if (PermissionHelper.CheckPermissionState (state, true) == PermissionState.Unrestricted)
				_flags = DataProtectionPermissionFlags.AllFlags;
			else
				_flags = DataProtectionPermissionFlags.NoFlags;
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:DataProtectionPermission.cs


示例20: FileDialogPermission

		// Constructors

		public FileDialogPermission (PermissionState state)
		{
			if (CheckPermissionState (state, true) == PermissionState.Unrestricted)
				_access = FileDialogPermissionAccess.OpenSave;
			else
				_access = FileDialogPermissionAccess.None;
		}
开发者ID:jack-pappas,项目名称:mono,代码行数:9,代码来源:FileDialogPermission.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Permissions类代码示例发布时间:2022-05-24
下一篇:
C# PermissionSet类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap