IsolatedStorageScope Výčet
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Výčet úrovní izolovaného rozsahu úložiště, které jsou podporovány IsolatedStorage.
Tento výčet podporuje bitové kombinace hodnot jeho členů.
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
- Dědičnost
- Atributy
Pole
Application | 32 | Izolované úložiště vymezené pro aplikaci. |
Assembly | 4 | Izolované úložiště vymezené na identitu sestavení. |
Domain | 2 | Izolované úložiště omezené na identitu domény aplikace. |
Machine | 16 | Izolované úložiště omezené na počítač. |
None | 0 | Žádné izolované využití úložiště. |
Roaming | 8 | Izolované úložiště je možné umístit do umístění v systému souborů, který může pocházet (pokud jsou v podkladovém operačním systému povolená roamingová uživatelská data). |
User | 1 | Izolované úložiště vymezené identitou uživatele |
Příklady
Následující příklad kódu ukazuje, jak IsolatedStorageScope se výčet používá v GetStore metodách.
// 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)
Poznámky
Slouží IsolatedStorageScope k určení stupně rozsahu izolovaného úložiště. Můžete zadat kombinace těchto úrovní, které jsou podporovány IsolatedStorage.