What should you do?

You create a service-oriented architecture (SOA) application that will be deployed on a Windows HPC Server 2008 cluster. The application contains a Windows Communication Foundation (WCF) service. The WCF service includes the following data contract class. (Line numbers are included for reference only.)

01 [DataContract]
02 public class Person
03 {
04 [DataMember]
05 public string FullName
06 {
07 get;
08 set;
09 }
10 }

You have the following business requirements:
Client applications must create new versions of the Person class by adding new data members and retaining the old version at the server side. No data must be lost when data passes from a new version to an old version and back to the new version of the Person class. You need to modify the Person class to ensure that the business requirements are met. What should you do?

You create a service-oriented architecture (SOA) application that will be deployed on a Windows HPC Server 2008 cluster. The application contains a Windows Communication Foundation (WCF) service. The WCF service includes the following data contract class. (Line numbers are included for reference only.)

01 [DataContract]
02 public class Person
03 {
04 [DataMember]
05 public string FullName
06 {
07 get;
08 set;
09 }
10 }

You have the following business requirements:
Client applications must create new versions of the Person class by adding new data members and retaining the old version at the server side. No data must be lost when data passes from a new version to an old version and back to the new version of the Person class. You need to modify the Person class to ensure that the business requirements are met. What should you do?

A.
Add the following code segment after line 09:
[OnDeserialized]
public void OnDeserialized(StreamingContext c)
{
}
[OnSerialized]
public void OnSerialized(StreamingContext c)
{
}

B.
Add the following code segment after line 09:
[OnDeserializing]
public void OnDeserializing(StreamingContext c)
{
}
[OnSerializing]
public void OnSerializing(StreamingContext c)
{
}

C.
Replace line 02 with the following code segment:
public class Person : IExtensibleDataObject
Add the following code segment after line 09:
public ExtensionDataObject ExtensionData
{
get;
set;
}

D.
Replace line 02 with the following code segment:
public class Person : IExtensibleObject<InstanceContext> Add the following code segment after line 09:
public IExtensionCollection<InstanceContext> Extensions {
get;
set;
}



Leave a Reply 0

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