IsolatedStorageFile.GetUserStoreForAssembly Metoda

Definicja

Uzyskuje wydzielony magazyn o zakresie użytkownika odpowiadający tożsamości zestawu wywołującego kodu.

public:
 static System::IO::IsolatedStorage::IsolatedStorageFile ^ GetUserStoreForAssembly();
public static System.IO.IsolatedStorage.IsolatedStorageFile GetUserStoreForAssembly ();
static member GetUserStoreForAssembly : unit -> System.IO.IsolatedStorage.IsolatedStorageFile
Public Shared Function GetUserStoreForAssembly () As IsolatedStorageFile

Zwraca

Obiekt odpowiadający izolowanemu zakresowi magazynu na podstawie tożsamości zestawu wywołującego kodu.

Wyjątki

Nie udzielono wystarczających izolowanych uprawnień magazynu.

Nie można zainicjować izolowanej lokalizacji magazynu.

-lub-

Nie można określić uprawnień do zestawu wywołującego.

Uwagi

Ten sam zestaw w różnych aplikacjach zawsze używa tego samego izolowanego magazynu podczas korzystania z tej metody.

GetUserStoreForAssembly jest funkcjonalnie równoważny z następującym kodem:

isoFile = IsolatedStorageFile::GetStore(IsolatedStorageScope::Assembly |
    IsolatedStorageScope::User, (Type^)nullptr, (Type^)nullptr);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly |
    IsolatedStorageScope.User, null, null);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly Or _
    IsolatedStorageScope.User, Nothing, Nothing)

Uwaga

Różne zestawy uruchomione w tej samej domenie aplikacji zawsze mają odrębne izolowane magazyny.

Dotyczy

Zobacz też