jjzjj

IsolatedStorage

全部标签

xml - Windows Phone 7.5 Mango 应用程序上的预加载数据库

我在visualstudio中为WindowsPhoneMango创建了一个应用程序,我需要一个字典数据库。我知道如何创建它,如何插入、更新和删除。我有一个300k的xml数据文件,我想将其预加载到该数据库(解析和插入-这不是问题)到应用程序中。问题是我不想在安装应用程序时这样做。我想要将数据库文件预装在独立的数据存储中。我还需要板载系统,因为xml内容可能每3个月更改一次。但是在手机上处理一个300k的xml文件——每次安装应用程序时——听起来很……愚蠢,因为我可以预装数据库……附言。linq中是否有合适的XML助手?例如用于缓存xml文件.. 最佳答案

xml - 如何将 StreamReader 转换为 XDocument?

我在IsolatedStorage中存储XML数据,同时从IsolatedStorage读取数据。我需要将StreamReader转换为XDocument。以下代码用于将StreamReader转换为XDocument。我收到类似这样的错误:“根元素丢失”using(IsolatedStorageFilemyIsolatedStorage=IsolatedStorageFile.GetUserStoreForApplication()){IsolatedStorageFileStreamisoFileStream=myIsolatedStorage.OpenFile("AllHeadL

xml - Windows Phone 7 - 加载一个大的 xml 文件

我正在尝试将xml文件加载到我的应用程序并将其显示在ListBox上。问题是xml文件大约5MB,在手机上加载大约需要40秒。当手机锁定屏幕并返回时,又需要40秒。我尝试使用isolatedstorage将数据存储在其上,但它并没有提高性能。这是我加载数据的代码:XDocumentloadedData=XDocument.Load("BigFile.xml");vardata=fromqueryinloadedData.Descendants("w")orderby(string)query.Element("e")selectnewmyClass{First=(string)quer

c# - 如何知道WINDOWS操作系统为独立存储提供的存储空间?

如何知道Windows操作系统为隔离存储提供的存储空间?我可以通过任何方法知道吗|属性(property)|C#中的类? 最佳答案 您可以像这样确定隔离存储的可用空间:usingSystem;usingSystem.IO;usingSystem.IO.IsolatedStorage;publicclassCheckingSpace{publicstaticvoidMain(){//Getanisolatedstoreforthisassemblyandputitintoan//IsolatedStoreFileobject.Isol

windows - 如何在 VB6 中引用 IsloatedStorage 文件夹?

VB6中如何引用IsolatedStorage文件夹? 最佳答案 您可以通过创建一个访问IsolatedStorage的.NET类库,然后通过互操作层将生成的程序集作为COM库公开。这是一篇可能有帮助的MSDN文章:http://msdn.microsoft.com/en-us/library/zsfww439(v=vs.71).aspx 关于windows-如何在VB6中引用IsloatedStorage文件夹?,我们在StackOverflow上找到一个类似的问题:

c# - 将列表(String)保存到应用程序/隔离存储(Win8.1)

我有一个包含多个字符串的列表,我想将其保存到IsolatedStorage。做一些显而易见的事情,比如Listl=newList();ApplicationData.Current.LocalSettings.Values["locations"]=l;导致Dataofthistypeisnotsupported错误。据我所知,为WP8silverlight改编此代码效果很好。我做错了什么? 最佳答案 ApplicationData.Current.LocalSettings仅支持basedatatypes.想想如果你有一个简单的L

.net - 我应该在哪里保存一个 xml 文件,以便它可以在 Windows 注销时由服务写入?

我应该在哪里保存一个xml文件,以便它可以在Windows注销时由服务(用C#编写)写入?谢谢史蒂文 最佳答案 你可以使用IsolatedStorage,但最合理的是Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),因为它将它保存在机器上的用户配置文件中,用于运行该服务的任何帐户。 关于.net-我应该在哪里保存一个xml文件,以便它可以在Windows注销时由服务写入?,我们在StackO

c# - 有人使用 .NET 的 System.IO.IsolatedStorage 吗?

我在阅读.NET中的System.IO.IsolatedStorage命名空间时发现我可以使用它来将文件存储到我的程序集或可执行文件的唯一位置。例如下面的代码:usingSystem.IO.IsolatedStorage;publicclassProgram{staticvoidMain(string[]args){IsolatedStorageFilestore=IsolatedStorageFile.GetUserStoreForAssembly();store.CreateFile("myUserFile.txt");}}在以下位置创建文件“myUserFile.txt”:C:\

c# - ClickOnce 和 IsolatedStorage

Winform应用程序在我们的Intranet中与ClickOnce一起发布。我们将个人对GUI的偏好存储在隔离存储中。一切正常:)问题是当我们有一个新版本的应用程序时,我们发布...所有首选项都丢失了!用户需要在每个版本上设置他们的偏好。有没有办法卡住整个应用程序而不是版本的隔离? 最佳答案 您需要使用应用程序作用域,而不是域作用域的独立存储。这可以通过使用IsolatedStorageFileStream的重载构造函数之一来完成。例子:usingSystem.IO;usingSystem.IO.IsolatedStorage;.

c# - 无法确定调用者的应用程序身份?

我正在VS2010中为WindowsPhone编写Silverlightpivot应用程序。我刚刚添加了来自msdnhere的示例代码.现在每次我重新加载设计器时都会出现异常:Unabletodetermineapplicationidentityofthecaller.atSystem.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScopescope,TypeappEvidenceType)atSystem.IO.IsolatedStorage.IsolatedStorageFile.GetStore(Iso