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 속성의 사용을 보여줍니다.

적용 대상

추가 정보