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
Атрибуты

Поля

Application 32

Изолированное хранение с областью ограниченного действия для приложения.

Assembly 4

Изолированное хранение с областью ограниченного действия для удостоверения сборки.

Domain 2

Изолированное хранение с областью ограниченного действия для удостоверения домена приложения.

Machine 16

Изолированное хранение с областью ограниченного действия для компьютера.

None 0

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

Roaming 8

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

User 1

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

Примеры

В следующем примере кода показано, как перечисление IsolatedStorageScope используется в методах 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)

Комментарии

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

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

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