Aracılığıyla paylaş


IsolatedStorageFile.CurrentSize Özellik

Tanım

Dikkat

IsolatedStorageFile.CurrentSize has been deprecated because it is not CLS Compliant. To get the current size use IsolatedStorageFile.UsedSize

Dikkat

IsolatedStorageFile.CurrentSize has been deprecated because it is not CLS Compliant. To get the current size use IsolatedStorageFile.UsedSize instead.

Önemli

Bu API, CLS uyumlu değildir.

Yalıtılmış depolamanın geçerli boyutunu alır.

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

Özellik Değeri

Yalıtılmış depolama kapsamında kullanılmakta olan depolama alanının toplam bayt sayısı.

Öznitelikler

Özel durumlar

Özelliği kullanılamıyor. Geçerli deponun bir dolaşım kapsamı var veya açık değil.

Geçerli nesne boyutu tanımlanmamış.

Örnekler

Aşağıdaki kod örneği özelliğini gösterir CurrentSize . Bu örneğin tam bağlamı için genel bakışa IsolatedStorageFile bakın.

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

Açıklamalar

Yalıtılmış depolama kapsamındaki tüm dosya ve dizinlerin toplam kullanımını temsil eder.

Geçerli boyut, bir gezici kullanıcı profiline katılan mağazalar için doğru belirlenemez. Dolaşım profilleri genellikle birden çok istemci makinesinde önbelleğe alınıp daha sonra bir sunucuyla eşitlendiğinden, bu tür depolar için kotalar zorunlu kılınamaz ve geçerli boyut raporlanmaz.

Nasıl yapılır: Yalıtılmış Depolama ile Alan Dışı Koşulları Tahmin Etme örneği, özelliğinin CurrentSize kullanımını gösterir.

Şunlara uygulanır

Ayrıca bkz.