不了解SyncDataConverter类的成员 [英] Don't understand members of SyncDataConverter class

查看:93
本文介绍了不了解SyncDataConverter类的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的代码中,我使用了从SyncDataConverter派生的类。 SyncDataConverter有两个虚拟方法:TryConvertDataRetrieverFromProviderFormat和TryConvertDataRetrieverToProviderFormat 。问题是我通过阅读文档来了解这些方法的目的(http://msdn.microsoft.com/en-us/library/dd937665%28SQL.105%29.aspx)。另外,我不明白DataRetrievers是什么。你能解释一下这些方法的用途和DataRetrievers的含义吗?

解决方案

数据检索器是GetChangeBatch方法的out参数致电提供商。 某些提供商可能不会使用NotifyingChangeApplier,因此可能不会使用更改应用程序所需的数据检索器(数据库提供程序就是一个很好的例子,尽管它们不能用于其他原因)。 如果您的提供者使用NotifyingChangeApplier并返回一个实现来自GetChangeBatch调用的IChangeDataRetriever的类,那么您可以从这些方法返回false。

 

Aaron


In my code, I' using a class derived from SyncDataConverter. SyncDataConverter has got two virtual methods: TryConvertDataRetrieverFromProviderFormat and TryConvertDataRetrieverToProviderFormat. The problem is that I don't understand the purpose of these methods by reading the docu (http://msdn.microsoft.com/en-us/library/dd937665%28SQL.105%29.aspx). Also, I don't understand what DataRetrievers are. Can you explain me the purpose of these methods and the meaning of DataRetrievers?

解决方案

The data retriever is an out parameter from the GetChangeBatch method call on the provider.  Some providers may not use the NotifyingChangeApplier and, as a result, may not use the data retriever required by the change applier (the database providers are a good example of this, though they can't be used for other reasons).  If your providers use the NotifyingChangeApplier and return a class that implements the IChangeDataRetriever from the GetChangeBatch call, then you can just return false from these methods.

 

Aaron


这篇关于不了解SyncDataConverter类的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆