WCF ServiceContract属性 [英] WCF ServiceContract Attribute

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

问题描述

大家好,

我希望有人可以在这个问题上为我提供帮助.我现在已经挣扎了一段时间,但我做得不好.

基本上,我有一个WCF服务库,其中包含各种服务.我的想法是在WPF表单(与serviceLibrary位于不同的名称空间)中以基址显示每个服务,并且用户必须能够有选择地启动/停止每个服务的托管.

我已经设法(通过反射)将所有服务从serviceLibrary导入到我的WPF项目中并显示它们.他们开始工作正常.

我要做的就是检索每个已实现服务合同的ToString()属性,甚至检索Interface的ServiceContract属性的Name属性.

任何建议\建议(甚至是整个想法)将不胜感激

此外,我实际上将如何从我的服务库中添加可用服务列表,并为它们创建主机列表,我可以根据自己的意愿启动/停止它们.

谢谢!

Hi All,

I hope someone can assist me in this issue. I''ve been struggling for a bit now and I''m not getting it right.

Basically, I have a WCF Service Library which contains various services. My idea is to display each service with it''s base address on a WPF form (which is in a different namespace from the serviceLibrary) and the user must be able to selectively start\stop the hosting of each service.

I have managed (through reflection) to get all the services from the serviceLibrary into my WPF project and display them. They start and work fine.

All I want to do is to retrieve the ToString() property of each implemented service contract or even the Name attribute of the ServiceContract attribute of the Interface.

any suggestions\advice (even on the whole idea) will be greatly appreciated

Additionally, how would I actually go about to add a list of available services from my service library and create a list of hosts for them which I can start\stop as i see fit?

Thanks!

推荐答案

我认为这会帮助您...
http://www.dotnetfunda.com/interview/exam286-what-are- Contracts-in-wcf.aspx [ ^ ]
i think it will help you...
http://www.dotnetfunda.com/interview/exam286-what-are-contracts-in-wcf.aspx[^]


这篇关于WCF ServiceContract属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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