PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You have successfully created two interfaces: IMyService and IMyServiceClient.
You need to ensure that the service is able to call methods from the client application by using the IMyServiceClient interface.
Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
[ServiceContract(CallbackContract=typeof(IMyServiceClient))]
public interface IMyService
{

}
public interface IMyServiceClient
{

}

B.
[ServiceContract(CallbackContract=typeof(IMyService))]
public interface IMyService
{

}
public interface IMyServiceClient
{

}

C.
[ServiceContract(SessionMode=SessionMode.Allowed)]
[ServiceKnownType(typeof(IMyServiceClient))]
public interface IMyService : IMyServiceClient
{

}
public interface IMyServiceClient
{

}

D.
[ServiceContract]
[ServiceKnownType(typeof(IMyServiceClient))]
public interface IMyService
{

}
[ServiceContract]
public interface IMyServiceClient : ICommunicationObject
{

}


Leave a Reply