Which four tasks should you perform?

You are creating a client application that will call a Windows Communication Foundation service.
The service was created by using Microsoft .NET Framework 3.5.
You write the following code segment.

[DataContract]
public class CreditCard
{
[DataMember]
public string Name{ get; set; }
[DataMember]
public string CardNumber
{
get{ return cardNumber; }
set {
if (IIsValidCreditCardNumber(value))
throw new ArgumentException("Invalid credit card number");
cardNumber = value;
}
}
}

You plan to share the validation logic between the client application and the WCF service.
You need to generate a client-side service proxy that includes the validation logic.
Which four tasks should you perform?
(Each correct answer presents part of the solution. Choose four.)

You are creating a client application that will call a Windows Communication Foundation service.
The service was created by using Microsoft .NET Framework 3.5.
You write the following code segment.

[DataContract]
public class CreditCard
{
[DataMember]
public string Name{ get; set; }
[DataMember]
public string CardNumber
{
get{ return cardNumber; }
set {
if (IIsValidCreditCardNumber(value))
throw new ArgumentException("Invalid credit card number");
cardNumber = value;
}
}
}

You plan to share the validation logic between the client application and the WCF service.
You need to generate a client-side service proxy that includes the validation logic.
Which four tasks should you perform?
(Each correct answer presents part of the solution. Choose four.)

A.
Create a Class Library project for the DataContract classes.

B.
In the Service project, add a reference to the Class Library project.

C.
In the Client project, add a reference to the Class Library project.

D.
In the Client project, use the Add Web Reference dialog box to reference the service.

E.
In the Client project, use the Add Service Reference dialog box to reference the service.

F.
In the Client project, use the Add Reference dialog box to add a project reference to the Service project



Leave a Reply 0

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