What are two possible ways to achieve this goal?

A Windows Communication Foundation (WCF) solution uses the following contracts. (Line
numbers are included for reference only.) When the client calls GetMessage on the service
interface, the service calls GetName on the client callback. In the client, the class
NameService implements the callback contract. The client channel is created as follows.
You need to ensure that the service callback is processed by the instance of NameService.
What are two possible ways to achieve this goal? (Each correct answer presents a
complete solution. Choose two.)

A Windows Communication Foundation (WCF) solution uses the following contracts. (Line
numbers are included for reference only.) When the client calls GetMessage on the service
interface, the service calls GetName on the client callback. In the client, the class
NameService implements the callback contract. The client channel is created as follows.
You need to ensure that the service callback is processed by the instance of NameService.
What are two possible ways to achieve this goal? (Each correct answer presents a
complete solution. Choose two.)

A.
Change line 25 to the following code segment. Dim factory As DuplexChannelFactory(Of
IGreetingService) = New DuplexChannelFactory(Of IGreetingService)( callbackContext,
binding, address)

B.
Change line 26 to the following code segment. Dim greetingService As IGreetingService
= factory.CreateChannel(callbackContext)

C.
Add the following code segment after line 26. callbackContext.IncomingChannels.Add(
DirectCast(greetingService, IDuplexChannel))

D.
Add the following code segment after line 26. callbackContext.OutgoingChannels.Add(
DirectCast(greetingService, IDuplexChannel))

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *