相关疑难解决方法(0)

处理隔离存储时,Schedule Agent上的交叉异常无效

我正在使用Windows Phone Schedule Agent,我试图在同步后尝试更新图片名称问题是我在"BitmapImage bmp = new BitmapImage();"这一行的此功能上遇到无效的交叉异常 而且真的不明白为什么.

void UpdateSyncPictureName(int AsyncStatus, int AticketID, int AsyncID, int ApictureID, int TsyncStatus = 0, int TsyncID = 0)
    {
        string filename = AsyncStatus + "-" + AticketID + "-" + AsyncID + "-" + ApictureID;
        using (IsolatedStorageFile ISF = IsolatedStorageFile.GetUserStoreForApplication())
        {
            if (ISF.FileExists(filename))
            {

                BitmapImage bmp = new BitmapImage();
                using (IsolatedStorageFileStream isoStream =
                    ISF.OpenFile(filename, System.IO.FileMode.Open))
                {
                    bmp.SetSource(isoStream);
                }
                ISF.DeleteFile(filename);
                WriteableBitmap Wbmp = new WriteableBitmap(bmp);
                using (IsolatedStorageFileStream isoStream =
                ISF.OpenFile(TsyncStatus + "-" + …
Run Code Online (Sandbox Code Playgroud)

isolatedstorage c#-4.0 windows-phone-7.1

1
推荐指数
1
解决办法
449
查看次数