IsolatedStorageScope Wyliczenie

Definicja

Wylicza poziomy izolowanego zakresu magazynu obsługiwanego przez IsolatedStorageprogram .

To wyliczenie obsługuje bitową kombinację jego wartości składowych.

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
Dziedziczenie
IsolatedStorageScope
Atrybuty

Pola

Application 32

Izolowany magazyn w zakresie aplikacji.

Assembly 4

Wydzielona pamięć masowa ograniczona do tożsamości zestawu.

Domain 2

Izolowany magazyn o zakresie tożsamości domeny aplikacji.

Machine 16

Izolowany magazyn o określonym zakresie dla maszyny.

None 0

Brak izolowanego użycia magazynu.

Roaming 8

Izolowany magazyn można umieścić w lokalizacji w systemie plików, która może poruszać się (jeśli dane użytkowników mobilnych są włączone w bazowym systemie operacyjnym).

User 1

Wydzielony magazyn o zakresie według tożsamości użytkownika.

Przykłady

W poniższym przykładzie kodu pokazano, jak IsolatedStorageScope wyliczenie jest używane w metodach GetStore .

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

Uwagi

Służy IsolatedStorageScope do określania stopnia zakresu dla izolowanego magazynu. Można określić kombinacje tych poziomów, które są obsługiwane przez program IsolatedStorage.

Dotyczy

Zobacz też