PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are creating an application that consumes a Windows Communication Foundation
(WCF) service. The service implements the IService contract. The client application
contains the CallbackHandler class, which implements IServiceCallback. You need to
ensure that a client proxy is created that can communicate with the service over a duplex
channel. Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
D. var handler = new CallbackHandler(); var clientFactory = new
DuplexChannelFactory<IService>{ typeof(CallbackHandler), new WSDualHttpBinding()); var
client = clientFactory.CreateChannel( new EndpointAddress (“•••”)) ;

B.
var handler = new CallbackHandler(); var clientFactory = new
DuplexChannelFactory<IService>{ new WSHttpContextBinding() ; var clienc =
clientFactory.CreateChannelt new InstanceContext (handler) , new EndpointAddress (“•••
“));

C.
var handler = new CallbackHandler(); var clientFactory = new
DuplexChonnelFaccory<IService>{ typeof(CallbackHandler), new WSDualHttpBinding ());
var client = clientFactory.CreateChannel( new InstanceContext (handler) , new
EndpointAddress (“•••”))

D.
var handler = new CallbackHandler(); var clientFactory = new
DuplexChannelFactory<IService>{ new WSHttpBinding()); var client =
clientFactory.CreateChannel( new InstanceContext (handler) , new EndpointAddress (“•••”))
;


Leave a Reply