Which code segment should you use?

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You write the following code segment.

[ServiceContract]
public interface IMathservice
{
[OperationContract]
int AddNumbers(int a, int b);
double AddNumbers(double a, double b);
}

You have not deployed the IMathservice service.
You need to expose the AddNumbers (double a, double b) operation to the IMathservice service contract.
Which code segment should you use?

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You write the following code segment.

[ServiceContract]
public interface IMathservice
{
[OperationContract]
int AddNumbers(int a, int b);
double AddNumbers(double a, double b);
}

You have not deployed the IMathservice service.
You need to expose the AddNumbers (double a, double b) operation to the IMathservice service contract.
Which code segment should you use?

A.
[OperationContract]
int AddNumbers(int a, int b);
[OperationContract]
double AddNumbers(double a, double b);

B.
[OperationContract(Name="AddInt")]
int AddNumbers(int a, int b);
[OperationContract(Name="AddDouble")]
double AddNumbers(double a, double b);

C.
[OperationContract(Action="IMathservice/AddInt")]
int AddNumbers(int a, int b);
[OperationContract(Action="IMathService/AddDouble")]
double AddNumbers(double a, double b);

D.
[OperationContract(Action="AddInt/*")]
int AddNumbers(int a, int b);
[OperationContract(Action="AddDouble/*")]
double AddNumbers(double a, double b);



Leave a Reply 0

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