IsolatedStorageFile.GetMachineStoreForApplication Metod

Definition

Hämtar datoromfattande isolerad lagring som motsvarar den anropande kodens programidentitet.

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

Returer

Ett objekt som motsvarar det isolerade lagringsomfånget baserat på den anropande kodens programidentitet.

Undantag

Det gick inte att fastställa programidentiteten för anroparen.

-eller-

Det gick inte att fastställa den beviljade behörighetsuppsättningen för programdomänen.

-eller-

Det går inte att initiera en isolerad lagringsplats.

Tillräckliga isolerade lagringsbehörigheter har inte beviljats.

Kommentarer

Alla sammansättningar som är associerade med ett program använder samma isolerade arkiv när du använder den här metoden.

GetMachineStoreForApplication är funktionellt likvärdig med följande kod:

isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Application |
    IsolatedStorageScope.Machine, null);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Application Or _
    IsolatedStorageScope.Machine,  Nothing)

Gäller för

Se även