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í.
Vytvoří výčet úrovní oboru izolovaného úložiště, které podporuje 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ě s oborem identity domény aplikace |
Machine | 16 | Izolované úložiště vymezené na počítač. |
None | 0 | Žádné izolované úložiště. |
Roaming | 8 | Izolované úložiště je možné umístit do umístění v systému souborů, které se může potulovat (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 se IsolatedStorageScope 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 nástrojem IsolatedStorage.
Platí pro
Viz také
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro