Azure客户端IServiceFilter不起作用

时间:2013-04-17 08:14:48

标签: android azure xamarin.android xamarin

我正在尝试使用官方的xamarin的azure组件在我的Android应用程序中实现Azure Mobile服务。我要使用过滤器来调用asure服务,我只是这样做了:

class Filter : IServiceFilter 
{ 
    public System.Threading.Tasks.Task Handle(IServiceFilterRequest request, IServiceFilterContinuation continuation) 
    { 
        throw new NotImplementedException(); 
    } 
}

正如您所看到的,它是IServiceFilter的一个简单实现,但它失败了!这是错误

  

TimestampFilter'未实现接口成员   “Microsoft.WindowsAzure.MobileServices.IServiceFilter.Handle(Microsoft.WindowsAzure.MobileServices.IServiceFilterRequest,   Microsoft.WindowsAzure.MobileServices.IServiceFilterContinuation)”。   “TimestampFilter.Handle(Microsoft.WindowsAzure.MobileServices.IServiceFilterRequest,   Microsoft.WindowsAzure.MobileServices.IServiceFilterContinuation)”   无法实施   “Microsoft.WindowsAzure.MobileServices.IServiceFilter.Handle(Microsoft.WindowsAzure.MobileServices.IServiceFilterRequest,   Microsoft.WindowsAzure.MobileServices.IServiceFilterContinuation)”   因为它没有匹配的返回类型   'System.Threading.Tasks.Task'

任何人都知道为什么?感谢

1 个答案:

答案 0 :(得分:-1)

错误消息表明返回类型不正确,所以我看了一下Assembly Browser:

public Task<IServiceFilterResponse> Handle(IServiceFilterRequest request,IServiceFilterContinuation continuation) 
{ 
    throw new NotImplementedException(); 
} 

那应该为你编译

相关问题