Windows Runtime Component + Azure Tables

廉价感情. 提交于 2020-01-17 12:25:10

问题


I want to use Azure tables in my Windows Runtime Component project. It is a Background Agent for my Windows 8.1 RT app. When I try to define my TableEntity derived class:

public class CustomEntity : TableEntity

I get this error:

Windows Runtime class 'CustomEntity' has an invalid base type 'Microsoft.WindowsAzure.Storage.Table.TableEntity'. Classes must derive either from System.Object or from a composable Windows Runtime Class. Implementation inheritance is not allowed.

I also tried deriving from ITableEntity but then I get this error:

Type 'WindowsRuntimeComponent4.CustomEntity' implements interface 'Microsoft.Windows.AzureStorage.Table.ITableEntity', which is not a Windows Runtime Interface. All interfaces that are implemented by exported types must be Windows Runtime interfaces.

I can get Azure tables to work in the main Windows 8.1 RT app, an equivalent Windows Phone 8.1 Silverlight App, and also the Background Agent for the Phone app. Anyone know why it won't work for Windows Runtime Component?


回答1:


Windows Runtime Components aren't supported by Azure Storage Client Library. This class derivation limitation is one of the reasons that the Component isn't supported.



来源:https://stackoverflow.com/questions/32545482/windows-runtime-component-azure-tables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!