IsolatedStorageFile.MaximumSize プロパティ

定義

注意事項

IsolatedStorageFile.MaximumSize has been deprecated because it is not CLS Compliant. To get the maximum size use IsolatedStorageFile.Quota

注意事項

IsolatedStorageFile.MaximumSize has been deprecated because it is not CLS Compliant. To get the maximum size use IsolatedStorageFile.Quota instead.

重要

この API は CLS 準拠ではありません。

クォータによる制限内で、分離ストレージとして確保できる領域の最大容量を表す値を取得します。

public:
 virtual property System::UInt64 MaximumSize { System::UInt64 get(); };
[System.CLSCompliant(false)]
[System.Obsolete("IsolatedStorageFile.MaximumSize has been deprecated because it is not CLS Compliant.  To get the maximum size use IsolatedStorageFile.Quota")]
public override ulong MaximumSize { get; }
[System.CLSCompliant(false)]
[System.Obsolete("IsolatedStorageFile.MaximumSize has been deprecated because it is not CLS Compliant. To get the maximum size use IsolatedStorageFile.Quota instead.")]
public override ulong MaximumSize { get; }
[System.CLSCompliant(false)]
public override ulong MaximumSize { get; }
[<System.CLSCompliant(false)>]
[<System.Obsolete("IsolatedStorageFile.MaximumSize has been deprecated because it is not CLS Compliant.  To get the maximum size use IsolatedStorageFile.Quota")>]
member this.MaximumSize : uint64
[<System.CLSCompliant(false)>]
[<System.Obsolete("IsolatedStorageFile.MaximumSize has been deprecated because it is not CLS Compliant. To get the maximum size use IsolatedStorageFile.Quota instead.")>]
member this.MaximumSize : uint64
[<System.CLSCompliant(false)>]
member this.MaximumSize : uint64
Public Overrides ReadOnly Property MaximumSize As ULong

プロパティ値

分離ストレージ領域の制限 (バイト単位)。

属性

例外

プロパティが使用できません。 アセンブリの作成から証拠がない場合、MaximumSize を判断できません。 オブジェクトを作成するときに、証拠を判断できませんでした。

分離ストレージ エラーが発生しました。

次のコード例は、 プロパティを MaximumSize 示しています。 この例の完全なコンテキストについては、概要を IsolatedStorageFile 参照してください。

StreamWriter^ writer = gcnew StreamWriter( isoStream );

// Update the data based on the new inputs.
writer->WriteLine( this->NewsUrl );
writer->WriteLine( this->SportsUrl );

// Calculate the amount of space used to record this user's preferences.
double d = isoFile->CurrentSize / isoFile->MaximumSize;
Console::WriteLine( "CurrentSize = {0}", isoFile->CurrentSize.ToString() );
Console::WriteLine( "MaximumSize = {0}", isoFile->MaximumSize.ToString() );
StreamWriter writer = new StreamWriter(isoStream);
// Update the data based on the new inputs.
writer.WriteLine(this.NewsUrl);
writer.WriteLine(this.SportsUrl);

// Calculate the amount of space used to record this user's preferences.
double d = isoFile.CurrentSize / isoFile.MaximumSize;
Console.WriteLine("CurrentSize = " + isoFile.CurrentSize.ToString());
Console.WriteLine("MaximumSize = " + isoFile.MaximumSize.ToString());
Dim writer As New StreamWriter(isoStream)
' Update the data based on the new inputs.
writer.WriteLine(Me.NewsUrl)
writer.WriteLine(Me.SportsUrl)

'  Calculate the amount of space used to record this user's preferences.
Dim d As Double = Convert.ToDouble(isoFile.CurrentSize) / Convert.ToDouble(isoFile.MaximumSize)
Console.WriteLine(("CurrentSize = " & isoFile.CurrentSize.ToString()))
Console.WriteLine(("MaximumSize = " & isoFile.MaximumSize.ToString()))

注釈

使用可能なバイト数は、管理者によって設定された分離ストレージ クォータによって制限されます。 クォータは証拠に基づいてセキュリティ ポリシーで構成されるため、同じコードが異なる証拠で実行されている場合は、別のクォータを受け取ることができます。 たとえば、ローカルで実行され、イントラネット上の共有からも実行されるアプリケーションは、異なるクォータを受け取る可能性があります。

方法: 分離ストレージを使用して領域不足の状態を予測 する」の例では、 プロパティの使用方法を MaximumSize 示します。

適用対象

こちらもご覧ください