News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
01 [ServiceContract(CallbackContract=typeof(INameService))]
02 public interface IGreetingService
03 {
04 [OperationContract]
05 string GetMessage();
06 }
07
08 [ServiceContract]
09 public intetface INameService
10 {
11 [OperationContract]
12 string GetName();
13 }

When the client calls GetMessage on the service intetface, 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:

22 InstanceContext callbackContext =
22 new Instance Context(new NameService("client"));
23
24
25 DuplexChannelFactory  factory = new DuplexChannelFactory
(
typeof(NameService), binding, address);
26 IGreetingService greetingService = factory.CreateChannel();

You need to ensure that the senvice 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.)

  1. Change line 25 to the following code segment:

    DuplexChannelFactory <IGreetingService> factory = new DuplexChannelFactory<IGreetingService>(callbackContext, binding, address);
  2. Change line 26 to the following code segment:

    IGreetingService greetingServicefactory = CreateChannel(callbackContext);
  3. Add the following code segment after line 26:

    callbackContextIncomingChannelsAdd((IDuplexChannel)greetingService)
  4. Add the following code segment after line 26:

    callbackContext.OutgoingChannels.Add((IDuplexChannel)greetingService)
Answer: Answer is a, b
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;