แก้ไข

แชร์ผ่าน


IsolatedStorageFile.IncreaseQuotaTo(Int64) Method

Definition

Enables an application to explicitly request a larger quota size, in bytes.

public:
 override bool IncreaseQuotaTo(long newQuotaSize);
public override bool IncreaseQuotaTo (long newQuotaSize);
[System.Runtime.InteropServices.ComVisible(false)]
public override bool IncreaseQuotaTo (long newQuotaSize);
override this.IncreaseQuotaTo : int64 -> bool
[<System.Runtime.InteropServices.ComVisible(false)>]
override this.IncreaseQuotaTo : int64 -> bool
Public Overrides Function IncreaseQuotaTo (newQuotaSize As Long) As Boolean

Parameters

newQuotaSize
Int64

The requested size, in bytes.

Returns

true if the new quota is accepted; otherwise, false.

Attributes

Exceptions

newQuotaSize is less than current quota size.

newQuotaSize is less than zero, or less than or equal to the current quota size.

The isolated store has been closed.

The current scope is not for an application user.

The isolated store has been disposed.

The isolated store has been removed.

-or-

Isolated storage is disabled.

Remarks

The IncreaseQuotaTo method enables an application to explicitly request a larger quota size in bytes. The new quota size must not be smaller than the current quota size, because only quota increases are allowed.

Whenever the IncreaseQuotaTo method is called, isolated storage calls the CheckSecuritySettings method.

You can implement policy decisions by creating a custom AppDomainManager object that overrides the CheckSecuritySettings method so that the object can perform policy decisions based on a IsolatedStorageSecurityState object.

If there is no custom AppDomainManager object, the quota increase request is denied, because the default implementation for CheckSecuritySettings returns false.

Currently, none of the hosts in the .NET Framework provide this customization, so IncreaseQuotaTo always returns false.

Applies to

See also