从 Windows Phone 使用数据服务,数据架构版本:IExtensibleDataObject 替代方案?
我正在通过 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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