-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
ExtensionDataObject.xml
66 lines (60 loc) · 4.72 KB
/
ExtensionDataObject.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<Type Name="ExtensionDataObject" FullName="System.Runtime.Serialization.ExtensionDataObject">
<TypeSignature Language="C#" Value="public sealed class ExtensionDataObject" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ExtensionDataObject extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Runtime.Serialization.ExtensionDataObject" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class ExtensionDataObject" />
<TypeSignature Language="F#" Value="type ExtensionDataObject = class" />
<TypeSignature Language="C++ CLI" Value="public ref class ExtensionDataObject sealed" />
<AssemblyInfo>
<AssemblyName>System.Runtime.Serialization</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime.Serialization.Xml</AssemblyName>
<AssemblyVersion>4.1.3.0</AssemblyVersion>
<AssemblyVersion>4.1.4.0</AssemblyVersion>
<AssemblyVersion>4.1.5.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.Serialization.Xml" ToVersion="5.0.0.0" FrameworkAlternate="net-5.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.Serialization.Xml" ToVersion="6.0.0.0" FrameworkAlternate="net-6.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.Serialization.Xml" ToVersion="7.0.0.0" FrameworkAlternate="net-7.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.Serialization.Xml" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.Serialization.Xml" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Stores data from a versioned data contract that has been extended by adding new members.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Serialization.ExtensionDataObject> is the structure that stores extra data encountered by the <xref:System.Runtime.Serialization.XmlObjectSerializer> during deserialization operations. The structure is used by serialization to write the extra data into the serialized instance. The structure is returned by the <xref:System.Runtime.Serialization.IExtensibleDataObject.ExtensionData%2A> property of the <xref:System.Runtime.Serialization.IExtensibleDataObject> interface.
## Examples
The following code serializes an instance of a type (`PersonVersion2`) that is the second version of the serializable type (`Person`). The second version contains extra data (`ID` field) that is not present in the first version. The code then deserializes the XML document into a `Person` object, then immediately reserializes the object including the extra data. Finally, the code deserializes the new XML into a `PersonVersion2` object and writes the complete data to the console, proving that the data has made a round trip to and from an older version of the type. Note that the <xref:System.Runtime.Serialization.DataContractAttribute> attribute must be applied with the <xref:System.Runtime.Serialization.DataContractAttribute.Name%2A> and <xref:System.Runtime.Serialization.DataContractAttribute.Namespace%2A> properties set to the same name and namespace as the original class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iunknownserializationdata/cs/iunknownserialization.cs" id="Snippet0":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/iunknownserializationdata/vb/iunknownserialization.vb" id="Snippet0":::
]]></format>
</remarks>
<altmember cref="T:System.Runtime.Serialization.IExtensibleDataObject" />
<altmember cref="T:System.Runtime.Serialization.XmlObjectSerializer" />
<altmember cref="T:System.Runtime.Serialization.DataContractAttribute" />
<altmember cref="T:System.Runtime.Serialization.DataMemberAttribute" />
<related type="Article" href="/dotnet/framework/wcf/feature-details/using-data-contracts">Using Data Contracts</related>
</Docs>
<Members />
</Type>