IsolatedStorageFile.IncreaseQuotaTo(Int64) 方法

定义

使应用程序能够显式请求更大的配额大小(以字节为单位)。

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

参数

newQuotaSize
Int64

请求的大小(以字节为单位)。

返回

true 如果接受新配额,则为否则,为 false.

属性

例外

newQuotaSize 小于当前配额大小。

newQuotaSize 小于零,或小于或等于当前配额大小。

隔离存储已关闭。

当前范围不适用于应用程序用户。

已释放隔离存储。

已删除独立存储区。

-或-

已禁用独立存储。

注解

此方法 IncreaseQuotaTo 使应用程序能够显式请求更大的配额大小(以字节为单位)。 新配额大小不得小于当前配额大小,因为只允许增加配额。

每当 IncreaseQuotaTo 调用该方法时,独立存储将调用该方法 CheckSecuritySettings

可以通过创建重写CheckSecuritySettings方法的自定义AppDomainManager对象来实现策略决策,以便对象能够基于IsolatedStorageSecurityState对象执行策略决策。

如果没有自定义AppDomainManager对象,则会拒绝配额增加请求,因为返回false的默认实现CheckSecuritySettings

目前,.NET Framework 中没有任何主机提供此自定义,因此IncreaseQuotaTo始终返回 false

适用于

另请参阅