Microsoft Sync Framework 的 WCF 问题

发布于 2024-07-24 16:26:09 字数 558 浏览 6 评论 0原文

我目前正在遵循以下示例 http://msdn.microsoft.com/en-us/library/cc807255。 ASPX 当我添加服务引用时,它具有 ISyncContract 合同 在我的客户端,有一个方法缺少一些参数

示例: 在我的合同文件上:

[OperationContract(IsInitiating = false, IsTerminating = false)]
void GetKnowledge(out uint batchSize, out SyncKnowledge knowledge);

在我的客户端:

private ISyncContract proxy;
(...)
proxy.GetKnowledge(out batchSize);

其他人也发生过这种情况吗? 我究竟做错了什么?

I'm currently following the example at
http://msdn.microsoft.com/en-us/library/cc807255.aspx
when I add a service reference, that has an ISyncContract contract
on my client side, there is a method that is missing some parameters

example:
on my contract file:

[OperationContract(IsInitiating = false, IsTerminating = false)]
void GetKnowledge(out uint batchSize, out SyncKnowledge knowledge);

on my client side:

private ISyncContract proxy;
(...)
proxy.GetKnowledge(out batchSize);

has this happened to some one else? what am i doing wrong?

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

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

发布评论

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

评论(2

血之狂魔 2024-07-31 16:26:09

如果您深入挖掘,您会发现您的代理调用提供者的 GetKnowledge() 并简单地将 null 作为 SyncKnowledge 传递。 看起来知识对象根本不需要设置。

您不能在合约中使用 SyncKnowledge,因为它不可序列化。

If you dig a bit deeper you will find that your proxy calls GetKnowledge() of the provider and simply passes null as SyncKnowledge. Looks like the knowledge object does not need to be set at all.

You can't use use the SyncKnowledge in your contract because it is not serializeable.

你是年少的欢喜 2024-07-31 16:26:09

它可能与您如何创建代理、如何在客户端和服务器之间共享类型有关,或者某些内容在应该公开时被标记为私有有关。

观看此视频,了解如何组织您的项目:

http://www. dnrtv.com/default.aspx?showNum=103

It is probably related to how you created the proxy, how you share types between client and server, or that someting is marked as private when it should be public.

Have a look at this video to see how to organize your project:

http://www.dnrtv.com/default.aspx?showNum=103

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