WP7 如何在 TombStoning 期间存储 LiveConnectSession?

编程入门 行业动态 更新时间:2024-10-27 12:23:46
本文介绍了WP7 如何在 TombStoning 期间存储 LiveConnectSession?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在使用 MS 提供的 PhotoSkyOnTheGo 示例的 windows 实时登录策略.因此,当我的应用启动时,它会显示一个 Windows Live 登录页面.

I'm using the windows live sign in strategy of the PhotoSkyOnTheGo example provided by MS. So when my app starts, it shows a windows live sign in page.

在应用运行时,我记得 LiveConnectSession 连接到 SkyDrive.

During app runtime I remember the LiveConnectSession to connect to SkyDrive.

现在当应用程序逻辑删除时,我需要一种方法来保存 LiveConnectSession.IndependentStorageSettings.ApplicationSettings 不起作用,可能是因为 LiveConnectSession 不可序列化(它在调试输出中显示了一些 InvalidDataContractException).

Now when the app tombstones, I need a way to save the LiveConnectSession. IsolatedStorageSettings.ApplicationSettings does not work, probably because the LiveConnectSession is not serializable (it shows some InvalidDataContractException in the debug output).

那么如果应用程序墓碑,我如何存储会话?还是提供的 PhotoSkyOnTheGo 示例是垃圾,我需要在访问 SkyDrive 时随时重新连接?

So how do I store the Session in case the app tombstones? Or is the provided PhotoSkyOnTheGo-example rubbish and I need to be able to reconnect anytime I'm accessing SkyDrive?

推荐答案

如果您的应用使用 wl.offline_access 范围,那么 live:SignInButton 控件会为您保存它并自动加载它.只需使用 SessionChanged 事件来捕获会话对象.这样,用户只需登录一次.

If your app uses wl.offline_access scope than the live:SignInButton control saves it for you and loads it automatically. Just use the SessionChanged event to capture the session object. This way the user will need to sign in only once.

范围:http://msdn.microsoft/en-us/library/live/hh243646.aspx#wlofflineaccess

事件:http://msdn.microsoft/en-us/library/live/microsoft.live.controls.signinbutton.sessionchanged.aspx

这篇关于WP7 如何在 TombStoning 期间存储 LiveConnectSession?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-25 15:11:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1118566.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   LiveConnectSession   TombStoning

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!