IsolatedStorageScope Enumeration

Definition

Zählt die Ebenen für den Gültigkeitsbereich der isolierten Speicherung auf, die von IsolatedStorage unterstützt werden.

Diese Enumeration unterstützt eine bitweise Kombination ihrer Memberwerte.

public enum class IsolatedStorageScope
[System.Flags]
public enum IsolatedStorageScope
[System.Flags]
[System.Serializable]
public enum IsolatedStorageScope
[System.Flags]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum IsolatedStorageScope
[<System.Flags>]
type IsolatedStorageScope = 
[<System.Flags>]
[<System.Serializable>]
type IsolatedStorageScope = 
[<System.Flags>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type IsolatedStorageScope = 
Public Enum IsolatedStorageScope
Vererbung
IsolatedStorageScope
Attribute

Felder

Application 32

Der Gültigkeitsbereich der isolierten Speicherung wird durch die Anwendung festgelegt.

Assembly 4

Der Gültigkeitsbereich der isolierten Speicherung wird durch die Identität der Assembly festgelegt.

Domain 2

Der Gültigkeitsbereich wird anhand der Identität der Anwendungsdomäne festgelegt.

Machine 16

Der Gültigkeitsbereich der isolierten Speicherung wird durch den Computer festgelegt.

None 0

Die isolierte Speicherung wird nicht verwendet.

Roaming 8

Der isolierte Speicher kann an einem roamingfähigen Speicherort im Dateisystem abgelegt werden, sofern das Roaming der Benutzerdaten im zugrunde liegenden Betriebssystem aktiviert ist.

User 1

Der Gültigkeitsbereich des isolierten Speichers wird anhand der Benutzeridentität festgelegt.

Beispiele

Im folgenden Codebeispiel wird veranschaulicht, wie die IsolatedStorageScope Enumeration in den GetStore Methoden verwendet wird.

// Retrieve an IsolatedStorageFile for the current Domain and Assembly.
IsolatedStorageFile^ isoFile = IsolatedStorageFile::GetStore( static_cast<IsolatedStorageScope>(IsolatedStorageScope::User | IsolatedStorageScope::Assembly | IsolatedStorageScope::Domain), (Type^)nullptr, nullptr );
IsolatedStorageFileStream^ isoStream = gcnew IsolatedStorageFileStream( this->userName,FileMode::Open,FileAccess::ReadWrite,isoFile );

// Retrieve an IsolatedStorageFile for the current Domain and Assembly.
IsolatedStorageFile isoFile =
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User |
    IsolatedStorageScope.Assembly |
    IsolatedStorageScope.Domain,
    null,
    null);

IsolatedStorageFileStream isoStream =
    new IsolatedStorageFileStream("substituteUsername",
    System.IO.FileMode.Open,
    System.IO.FileAccess.Read,
     System.IO.FileShare.Read);
' Retrieve an IsolatedStorageFile for the current Domain and Assembly.
Dim isoFile As IsolatedStorageFile = _
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User _
    Or IsolatedStorageScope.Assembly _
    Or IsolatedStorageScope.Domain, Nothing, Nothing)

Dim isoStream As New IsolatedStorageFileStream("substituteUsername", System.IO.FileMode.Open, _
    System.IO.FileAccess.Read, System.IO.FileShare.Read)

Hinweise

Geben Sie IsolatedStorageScope einen Bereich für einen isolierten Speicher an. Sie können Kombinationen dieser Ebenen angeben, die von IsolatedStorage.

Gilt für

Siehe auch