Click or drag to resize

IXmlSerializationSurrogateDeserialize Method

Deserialize the object from xml.

Namespace: Altaxo.Serialization.Xml
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
Object? Deserialize(
	Object? o,
	IXmlDeserializationInfo info,
	Object? parentobject
)

Parameters

o  Object
Is null except when a base type is deserialized, in this case this is the object instance of a super class.
info  IXmlDeserializationInfo
The serialization info used to deserialize the stream.
parentobject  Object
The object which is serialized before in the object hierarchie.

Return Value

Object
The object which is deserialized.
Remarks
All deserialization code should check if object o is null. In this case it has to create a instance of the class which is about to be deserialized. If it is not null, the deserialization code of a super class has already created a instance. In this case the code had to use this instance! It is recommended to use always the following code (except abstract and sealed classes):
C#
public object Deserialize(object o, SampleFileRenamer.Serialization.Xml.IXmlDeserializationInfo info, object parent)
{
Foo s = null!=o ? (Foo)o : new Foo();
// (Deserialization code follows here) ...
}
See Also