MB7-701 ExamCertify.com

Page 5

operation where data is received, processed, and sent back, the extra data is sent back to the original sender intact. This is useful to store data received from future versions of the contract. If you do not implement the interface, any extra data is ignored and discarded during a roundtrip operation. IExtensibleDataObject Interface (http://msdn.microsoft.com/en-us/library/system.runtime.serialization.iextensibledataobject.aspx) // Implement the IExtensibleDataObject interface to store the extra data for future versions. [DataContract(Name = "Person", Namespace = "http://www.cohowinery.com/employees")] class Person : IExtensibleDataObject // To implement the IExtensibleDataObject interface, // you must implement the ExtensionData property. The property // holds data from future versions of the class for backward compatibility. private ExtensionDataObject extensionDataObject_value; public ExtensionDataObject ExtensionData get return extensionDataObject_value; set extensionDataObject_value = value; [DataMember] public string Name; Forward-Compatible Data Contracts (http://msdn.microsoft.com/en-us/library/ms731083.aspx)

Question: 4 A Windows Communication Foundation (WCF) application uses a data contract that has several data members. You need the application to throw a SerializationException if any of the data members are not present when a serialized instance of the data contract is deserialized. What should you do? A. Add the KnownType attribute to the data contract. Set a default value in each of the data member declarations. B. Add the KnownType attribute to the data contract. Set the Order property of each data member to unique integer value. C. Set the EmitDefaultValue property of each data member to false. D. Set the lsRequired property of each data member to true.

Answer: D Section: (none) Explanation Explanation/Reference: DataMemberAttribute.IsRequired Property Gets or sets a value that instructs the serialization engine whether the member must be present in the

http://www.examcertify.com/MB7-701.html

Page 5


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.