本文整理汇总了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;未经允许,请勿转载。 |
请发表评论