IsolatedStorageScope Enum

Definition

Enumerates the levels of isolated storage scope that are supported by IsolatedStorage.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

public enum class IsolatedStorageScope
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum IsolatedStorageScope
type IsolatedStorageScope = 
Public Enum IsolatedStorageScope
Inheritance
IsolatedStorageScope
Attributes

Fields

Application 32

Isolated storage scoped to the application.

Assembly 4

Isolated storage scoped to the identity of the assembly.

Domain 2

Isolated storage scoped to the application domain identity.

Machine 16

Isolated storage scoped to the machine.

None 0

No isolated storage usage.

Roaming 8

The isolated store can be placed in a location on the file system that might roam (if roaming user data is enabled on the underlying operating system).

User 1

Isolated storage scoped by user identity.

Examples

The following code example demonstrates how the IsolatedStorageScope enumeration is used in the GetStore methods.

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

Remarks

Use IsolatedStorageScope to specify a degree of scope for an isolated store. You can specify combinations of these levels that are supported by IsolatedStorage.

Applies to

See also