You need to ensure that RecordPayments can correctly deserialize into an Employee or a Customer object

You are developing a Windows Communication Foundation (WCF) service that contains the
following service contract. <ServiceContract() > Public Interface IPaymentService
<OperationContract() > Sub RecordPayments(ByVal person As Person) End Interface

Public Class Person End Class Public Class Employee Inherits Person End Class Public
Class Customer Inherits Person End Class You need to ensure that RecordPayments can
correctly deserialize into an Employee or a Customer object. What should you do?

You are developing a Windows Communication Foundation (WCF) service that contains the
following service contract. <ServiceContract() > Public Interface IPaymentService
<OperationContract() > Sub RecordPayments(ByVal person As Person) End Interface

Public Class Person End Class Public Class Employee Inherits Person End Class Public
Class Customer Inherits Person End Class You need to ensure that RecordPayments can
correctly deserialize into an Employee or a Customer object. What should you do?

A.
Implement the IExtension(Of T) interface in the Person class.

B.
Add the following KnownType attributes to the Person class.
<KnownType(GetType(Employee))> <KnownType(GetType(Customer))>

C.
Implement the IExtensibleDataObject interface in the Person class.

D.
Add the following KnownType attribute to the Employee class and to the Customer class.
<KnownType(GetType(Person))>



Leave a Reply 0

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