IsolatedStorageFile.GetMachineStoreForAssembly 方法

定義

取得對應於呼叫程式碼的組件識別之機器範圍隔離儲存區。

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

傳回

物件,該物件對應至以呼叫程式碼的組件識別為基礎的隔離儲存區範圍。

例外狀況

無法初始化隔離的儲存區位置。

尚未授與足夠的隔離儲存區使用權限。

備註

不同應用程式內的相同元件在使用此方法時,一律使用相同的隔離存放區。

GetMachineStoreForAssembly 在功能上相當於下列程式代碼:

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

注意

在相同應用程式域內執行的不同元件一律會有不同的隔離存放區。

適用於

另請參閱