IsolatedStorageScope Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enumerates the levels of isolated storage scope that are supported by IsolatedStorage.
This enumeration supports a bitwise combination of its member values.
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
- Inheritance
- 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.