public DataProtectionPermission(PermissionState state)
 {
     if (PermissionHelper.CheckPermissionState(state, true) == PermissionState.Unrestricted)
     {
         _flags = DataProtectionPermissionFlags.AllFlags;
     }
 }
Ejemplo n.º 2
0
        protected ResourcePermissionBase(PermissionState state) : this()
        {
#if NET_2_0
            PermissionHelper.CheckPermissionState(state, true);
#else
            // there are no validation of the permission state
            // but any invalid value results in a restricted set
#endif
            _unrestricted = (state == PermissionState.Unrestricted);
        }
 public StorePermission(PermissionState state)
 {
     if (PermissionHelper.CheckPermissionState(state, true) == PermissionState.Unrestricted)
     {
         _flags = StorePermissionFlags.AllFlags;
     }
     else
     {
         _flags = StorePermissionFlags.NoFlags;
     }
 }
Ejemplo n.º 4
0
 protected ResourcePermissionBase(PermissionState state) : this()
 {
     PermissionHelper.CheckPermissionState(state, true);
     _unrestricted = (state == PermissionState.Unrestricted);
 }