使 Func<>代表可在 Windows Phone 7 中持久保存

发布于 2025-01-02 08:05:53 字数 406 浏览 4 评论 0 原文

我正在开发一个适用于 Windows Phone 7 的应用程序。我想让我的应用程序可持久化,以便我可以在重新启动后恢复我的应用程序。

但问题是我有一些 func<>委托成员动态地指向我想要保留的某些类对象中的某些函数。

Actually I am serializing my func<> delegate member  using [datamember] attribute
and deserializeing it to persist state.

而且我不知道它们在Wp7中是否可以持久。

我知道它在WPF中是可持久的。我读了几篇文章,似乎它在WP7中不可持久。

func<> 的替代方案是什么?如果它在 WP7 中不可持久。

I am developing an application for windows phone 7.I want to make my application persist-able so that I can restore my application after restart.

but the problem is that I have some func<> delegates members which are ,dynamically pointing to some functions ,in some of Class objects which I want to persist.

Actually I am serializing my func<> delegate member  using [datamember] attribute
and deserializeing it to persist state.

And I don not know whether they are persist-able or not in Wp7.

I know that it is persist-able in WPF.I read few articles and it seems it is not persist-able in WP7.

And What is an alternative for func<> if it is not persist-able in WP7.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

○愚か者の日 2025-01-09 08:05:53

您可以序列化委托,但这有点冒险,因为只保存编译器生成的名称。

查看此示例

You can serialize the delegates, but it is a bit risky cause only the compiler generated name is saved.

Look at this example

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文