PrepAway - Latest Free Exam Questions & Answers

Which code segments should you include in Target 1 and …

DRAG DROP
You are supporting a WCF data contract that can be expanded to add new data members.
Clients using the old version of the data contract must be supported.
You need to define the data contract so that the data serializer can put unknown data members into a property
bag.
You have the following code:

Which code segments should you include in Target 1 and Target 2 to complete the data contract? (To answer,
drag the appropriate code elements to the correct targets in the answer area. Each code element may be used
once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:
Target 1: IExtensibleDataObject
Implement the IExtensibleDataObject interface to store the extra data for future versions.
Target 2: ExtensionDataObject
To implement the IExtensibleDataObject interface, you must implement the ExtensionData property. The
property holds data from future versions of the class for backward compatibility.
Example code:
[DataContract]
class Person : IExtensibleDataObject
{
private ExtensionDataObject extensionDataObject_value;
etc.
https://msdn.microsoft.com/en-us/library/system.runtime.serialization.extensiondataobject
(v=vs.110).aspx

4 Comments on “Which code segments should you include in Target 1 and …


Leave a Reply