Beispiel #1
0
		private static void Demand (IsolatedStorageScope scope)
		{
			if (SecurityManager.SecurityEnabled) {
				IsolatedStorageFilePermission isfp = new IsolatedStorageFilePermission (PermissionState.None);
				isfp.UsageAllowed = ScopeToContainment (scope);
				isfp.Demand ();
			}
		}
 // 
 private void EnsureQuota(long size) {
     IsolatedStoragePermission storagePerm = new IsolatedStorageFilePermission(PermissionState.None);
     storagePerm.UserQuota = size;
     storagePerm.UsageAllowed = _isRoaming? IsolatedStorageContainment.DomainIsolationByRoamingUser :
                                            IsolatedStorageContainment.DomainIsolationByUser;
     storagePerm.Demand();
 }