English 中文(简体)
WCF服务代理班,美国广播公司(1}栏)
原标题:Wrapping a .NET WCF service proxy class in a USING { } block?

问 问 问 题,但用说明总结服务代理类别是最佳做法吗? 在瑞士联邦统计局,我们产生了一个代理机构,负责全球合作框架服务。 对于服务类别,是否应当加以总结? 我并不认为它能够实施IDisposable,没有处置方法。 感谢。

最佳回答

虽然服务参考资料和vcutil.exe do 执行<编码> 可支配所产生的近似值,但一般而言是not在<代码>using栏内加以总结的最佳做法;相反,赞成开放和封闭。

为什么? 问题在于,<代码>Dispose方法Close,可在各种情况下投掷<>>,如果该频道处于违约状态,则最为突出。 总的来说,情况不好,但如果最后出现这种情况,因为你允许错节,可能会使最初的过失例外不利于<代码>。 近例外,实际上失去了原来的例外。

问题回答

暂无回答




相关问题
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 to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!