[英]Get isolated storage for assembly
我需要在安裝結束時為我的應用程序在安裝過程中的組裝創建隔離存儲,以加載它的初始設置。 它在安裝過程中沒有加載,但我知道它的名稱和完整路徑。
我想使用這種方法:
IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, **assembly param**);
但我不知道在文檔中的程序集參數中放入什么它有幾個重載,但我無法正確調用它。
當應用程序工作時,我們初始化隔離存儲,如:
IsolatedStorageFile.GetUserStoreForAssembly()
所以我需要在安裝過程中獲取相同的文件夾。
有任何想法嗎?
在這種情況下,調用 IsolatedStorageFile.GetStore 的正確方法如下:
var identity = new System.Security.Policy.Url(@"file:///fullpatch to your dll");
IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, identity);
知道組裝路徑,我們可以為組裝初始化隔離存儲。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.