English 中文(简体)
WCF:总结遗留的问题
原标题:WCF: wrapping legacy API question

我必须把原封面的蚊帐组装成产品总分类和接口。 代表将服务视为代表对现有班级几乎没有任何额外工作的代理。

因此,我添加了<代码>[服务合同]接口,暴露了处理现有结构和类别的方法。 但是,主氧气发电机(svcutil)除去了一些田地(称为仅读物),对别的则不够聪明(例如:public bool Boolean1{回归水器[0]<>>>/代码>变成了条码>Bolulean1{;制定;})。

我决定重复这些遗产类别,以消除混淆。 现在,一些现有班级和邮局有合同安全版本;工联服务有另外的法典,将合同安全等级转化为遗留班和办公室;反之亦然。

你们是否建议重复所有遗产类别,还是只为问题类别转变? 也许有一些额外的代用发电机参数被忽略。

事先感谢你!

最佳回答

代理人不像你所读的财产一样,因为它需要使物体的序列化,并且能够这样做,而没有能够将序列化的价值重新标出。

比较容易修改您的遗产类别,使之方便于全球合作框架,但通常不是一种选择。 您为从遗产类别转换为“世界家庭-安全”类别而创建的课堂似乎很好,但显然并不理想,因为你引进了另一个层次,只是使用“世界家庭”的课堂。

问题回答

暂无回答




相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签