IsolatedStorageFile.GetMachineStoreForAssembly 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取与调用代码的程序集标识对应的计算机范围的独立存储。
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, null, null);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly Or _
IsolatedStorageScope.Machine, Nothing, Nothing)
注释
在同一应用程序域中运行的不同程序集始终具有不同的独立存储。