Bagikan melalui


IsolatedStorageFile.MaximumSize Properti

Definisi

Perhatian

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

Perhatian

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

Penting

API ini bukan kompatibel CLS.

Mendapatkan nilai yang mewakili jumlah maksimum ruang yang tersedia untuk penyimpanan terisolasi dalam batas yang ditetapkan oleh kuota.

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

Nilai Properti

Batas ruang penyimpanan terisolasi dalam byte.

Atribut

Pengecualian

Properti tidak tersedia. MaximumSize tidak dapat ditentukan tanpa bukti dari pembuatan assembly. Bukti tidak dapat ditentukan kapan objek dibuat.

Terjadi kesalahan penyimpanan terisolasi.

Contoh

Contoh kode berikut menunjukkan MaximumSize properti . Untuk konteks lengkap contoh ini, lihat IsolatedStorageFile gambaran umum.

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()))

Keterangan

Jumlah byte yang tersedia dibatasi oleh kuota penyimpanan terisolasi yang ditetapkan oleh administrator. Kuota dikonfigurasi dalam kebijakan keamanan berdasarkan bukti, sehingga kode yang sama dapat menerima kuota yang berbeda jika dijalankan dengan bukti yang berbeda. Misalnya, aplikasi yang dijalankan secara lokal dan juga dari berbagi pada intranet kemungkinan akan menerima kuota yang berbeda.

Contoh Cara: Mengantisipasi Kondisi Di Luar Ruang dengan Penyimpanan Terisolasi menunjukkan penggunaan MaximumSize properti.

Berlaku untuk

Lihat juga