IsolatedStorageScope Перечисление

Определение

Перечисляет уровни изолированной области хранения, поддерживаемые IsolatedStorage.

Это перечисление поддерживает побитовую комбинацию значений его членов.

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
Наследование
IsolatedStorageScope
Атрибуты

Поля

Имя Значение Описание
None 0

Отсутствие изолированного использования хранилища.

User 1

Изолированное хранилище, заданное удостоверением пользователя.

Domain 2

Изолированное хранилище, ограниченное удостоверением домена приложения.

Assembly 4

Изолированное хранилище, ограниченное удостоверением сборки.

Roaming 8

Изолированное хранилище можно поместить в расположение файловой системы, которое может перемещаться (если перемещаемые данные пользователя включены в базовой операционной системе).

Machine 16

Изолированное хранилище, ограниченное на компьютере.

Application 32

Изолированное хранилище, ограниченное приложением.

Примеры

В следующем примере кода показано, как IsolatedStorageScope перечисление используется в методах GetStore .


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

Комментарии

Используется IsolatedStorageScope для указания степени области для изолированного хранилища. Можно указать сочетания этих уровней, поддерживаемых IsolatedStorage.

Применяется к

См. также раздел