从 Windows Phone 使用数据服务,数据架构版本:IExtensibleDataObject 替代方案?

发布于 2025-01-03 14:41:10 字数 300 浏览 5 评论 0原文

我正在通过 DataServiceContext 使用 System.Data.Services.Client dll 从 Windows Phone azure 应用程序访问 Azure 存储(表)。

我的问题是,在我的数据类中,我无法使用 IExtensibleDataObject,因为 Silverlight 不支持它。

应用 XmlSerializerFormat 属性也不会影响它,似乎在使用数据服务时被忽略(Fiddler 显示数据并不是真正的 XML 格式)。

有没有办法可以防止我的应用程序在每次向表中添加新字段时崩溃?

I'm accessing Azure storage (table) from my windows phone azure app, using System.Data.Services.Client dll, via DataServiceContext.

My problem is that in my data classes I can't use IExtensibleDataObject as it's not supported in Silverlight.

Applying XmlSerializerFormat attribute also doesn't affect it, seems like it is ignored when using data services (Fiddler shows that the data is not really in XML format).

Is there a way I can prevent my app from crushing each time a new field is added to the table?

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

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

发布评论

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

评论(1

请你别敷衍 2025-01-10 14:41:10

IExtensibleDataObject 类型在 WCF 的 Silverlight Windows Phone 版本中不可用。如果您遇到此类型的错误,您应该能够重新生成代理类。

您可以使用 Visual Studio 上 WP 项目中的“添加服务引用”选项重新生成代理类。

您还可以使用 Windows Phone 服务实用程序。我的在这里找到:

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\SlSvcUtil.exe

The type IExtensibleDataObject isn't available in the Silverlight Windows Phone version of WCF. If you have an error regarding this type, you should be able to regenerate the proxy class.

You can regenerate your proxy class by using the "Add Service Reference" option in the WP project on Visual Studio.

You can also use the Windows Phone service utility. Mine was found here:

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\SlSvcUtil.exe

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