Click or drag to resize

SerializerSurrogate Class

This class is used when serializing/deserializing, either to replace one (de)serialized type with another, or to setup relations that the (de)serializer can not itself setup.
Inheritance Hierarchy
SystemObject
  DHI.Mike1D.GenericSerializerSurrogate

Namespace:  DHI.Mike1D.Generic
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax
C#
public class SerializerSurrogate : IDataContractSurrogate

The SerializerSurrogate type exposes the following members.

Constructors
  NameDescription
Public methodSerializerSurrogate
Initializes a new instance of the SerializerSurrogate class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetCustomDataToExport(MemberInfo, Type)
During schema export operations, inserts annotations into the schema for non-null return values. Not implemented
Public methodGetCustomDataToExport(Type, Type)
During schema export operations, inserts annotations into the schema for non-null return values. Not implemented
Public methodGetDataContractType
The GetDataContractType method maps one type to another. On serialization, the mapping returned by this method is subsequently used to transform the original instance to a surrogated instance by calling the GetObjectToSerialize method. On deserialization, the mapping returned by this method is used by the serializer to deserialize into an instance of the surrogate type. It subsequently calls GetDeserializedObject to transform the surrogated instance into an instance of the original type. If the type is not handled by this class, the input type is just returned.
Public methodGetDeserializedObject
The GetDeserializedObject method converts the surrogated type instance to the original type instance. It is required for deserialization. Return input object, if not handling type.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetKnownCustomDataTypes
Sets the collection of known types to use for serialization and deserialization of the custom data objects. This method is required during schema export or schema import only if annotations are inserted into the schema using the GetCustomDataToExport method.
Public methodGetObjectToSerialize
The GetObjectToSerialize method converts the original type instance to the surrogated type instance. The method is required for serialization. Return input object, if not handling type
Public methodGetReferencedTypeOnImport
During schema import, returns the type referenced by the schema. Not implemented
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodProcessImportedType
Processes the type that has been generated from the imported schema. When importing a schema, this method allows for any imported type and compilation information to be customized. Not implemented
Public methodRegisterSurrogateHandler
Register a ISerializerSurrogateHandler to handle one specific type
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also