Which code segment should you use?

You create a Windows Communication Foundation (WCF) service by using Microsoft .NET Framework 3.5.
The WCF service contains two operations named ProcessSimpleOrder and ProcessComplexOrder.
You need to expose the ProcessSimpleOrder operation to all the client applications.
You also need to expose the ProcessComplexOrder operation only to specific client applications.
Which code segment should you use?

You create a Windows Communication Foundation (WCF) service by using Microsoft .NET Framework 3.5.
The WCF service contains two operations named ProcessSimpleOrder and ProcessComplexOrder.
You need to expose the ProcessSimpleOrder operation to all the client applications.
You also need to expose the ProcessComplexOrder operation only to specific client applications.
Which code segment should you use?

A.
[ServiceContract]
public interface IOrderManager
{
[OperationContract(Action="*")]
void ProcessSimpleOrder();
[OperationContract]
void ProcessComplexOrder();
}

B.
[ServiceContract]
public interface IOrderManager
{
[OperationContract(Name="http://contoso.com/Simple")]
void ProcessSimpleOrder();
[OperationContract(Name="http://contoso.com/Complex")]
void ProcessComplexOrder();
}

C.
[ServiceContract]
public interface ISimpleOrderManager
{
[OperationContract]
void ProcessSimpleOrder();
}
[ServiceContract]
public interface IComplexOrderManager: ISimpleOrderManager
{
[OperationContract]
void ProcessComplexOrder();
}

D.
[ServiceContract]
public interface ISimpleOrderManager
{
[OperationContract(Name="http://contoso.com/Simple")]
void ProcessSimpleOrder();
}
public interface IComplexOrderManager: ISimpleOrderManager
{
[OperationContract(Name="http://contoso.com/Complex")]
void ProcessComplexOrder();
}



Leave a Reply 0

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