c# - Generating wcf proxy vs ChannelFactory -
Which of the two methods of using WCF service is better?
This is a bit boring to call wcf service
IMyContract proxy1 = null; Try {Proxy1 = factory.CreateChannel (); Proxy1.MyMethod (); (ICommunicationObject) proxy1) .close (); } Hold {(IommunicationObject) Proxy 1) .bort (); }
Should this snippet be repeated for every proxy call? Or is there a general way to create a wrapper class to close and cancel the proxy?
In this way, serviceExecution.Execute (proxy => proxy .maymathim ()) is typing;
which creates a proxy, and is a good way to turn it off or turn it off?
An MSDN post is that it is not recommended to use the generated proxy in .Net 3 Because it makes the channel processor every time. Net 3.5 channel feature is cached.
But personally I like to use the channelfifiers, generated code always hurts after pain
Comments
Post a Comment