【发布时间】:2012-05-20 00:56:07
【问题描述】:
我正在尝试在我的应用中实施 SkyDrive 备份。一切正常,除了我不知道如何轻松地将流(从 SkyDrive 下载的备份)保存到独立存储中。
我知道我可以对流进行反序列化而不是保存它,但这会不必要地复杂。
所以,这是我的问题:
我有一个包含 SkyDrive 文件的流,我需要将它作为文件“Settings.XML”保存到独立存储中。
所以基本上我需要将“流”写入独立存储中的 Settings.xml 文件
static void client_DownloadCompleted(object sender, LiveDownloadCompletedEventArgs e, string saveToPath)
{
Stream stream = e.Result; //Need to write this into IS
try
{
using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
{
using (IsolatedStorageFileStream fileStream = myIsolatedStorage.OpenFile(saveToPath, FileMode.Create))
{
//How to save it?
}
}
}...
谢谢!
【问题讨论】:
标签: c# windows-phone-7 stream isolatedstorage onedrive