Izolované úložiště a roaming
Cestovní uživatelské profily jsou funkcí systému Microsoft Windows (k dispozici na některých aktualizovaných systémech Windows 98, Windows NT, Windows 2000, Windows XP a Windows Vista) umožňující uživateli nastavit identitu v síti a přihlásit se pomocí dané identity do libovolného síťového počítače s tím, že se přenesou všechna individuální nastavení. Sestavení využívající izolované úložiště může určit, že izolované úložiště od uživatele bude přesunuto s cestovním profilem uživatele. Cestování lze použít ve spojení s izolací podle uživatele a sestavení nebo s izolací podle uživatele, domény a sestavení. Pokud není použit rozsah cestování, úložiště nebudou cestovat ani když je použit cestovní profil.
Příklad
Následující příklad kódu načte cestovní úložiště izolované uživatelem a sestavením. Úložiště je přístupné prostřednictvím objektu isoFile .
Dim isoFile As IsolatedStorageFile = _
IsolatedStorageFile.GetStore(IsolatedStorageScope.User Or _
IsolatedStorageScope.Assembly Or _
IsolatedStorageScope.Roaming, Nothing, Nothing)
IsolatedStorageFile isoFile =
IsolatedStorageFile.GetStore(IsolatedStorageScope.User |
IsolatedStorageScope.Assembly |
IsolatedStorageScope.Roaming, null, null);
IsolatedStorageFile^ isoFile =
IsolatedStorageFile::GetStore(IsolatedStorageScope::User |
IsolatedStorageScope::Assembly |
IsolatedStorageScope::Roaming, (Type^)nullptr, (Type^)nullptr);
Rozsah domény může být přidán pro vytvoření cestovního úložiště izolovaného uživatelem, doménou a aplikací. Následující příklad kódu to ukazuje.
Dim isoFile As IsolatedStorageFile = _
IsolatedStorageFile.GetStore(IsolatedStorageScope.User Or _
IsolatedStorageScope.Assembly Or IsolatedStorageScope.Domain Or _
IsolatedStorageScope.Roaming, Nothing, Nothing)
IsolatedStorageFile isoFile =
IsolatedStorageFile.GetStore(IsolatedStorageScope.User |
IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain |
IsolatedStorageScope.Roaming, null, null);
IsolatedStorageFile^ isoFile =
IsolatedStorageFile::GetStore(IsolatedStorageScope::User |
IsolatedStorageScope::Assembly | IsolatedStorageScope::Domain |
IsolatedStorageScope::Roaming, (Type^)nullptr, (Type^)nullptr);