PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Serialization Namespace / ISerializer­Factory­Provider Interface / ISerializer­Factory­Provider Methods / ISerializer­Factory­Provider.​Get­Surrogate­Type Method

ISerializerFactoryProvider.GetSurrogateType Method

Gets the surrogate type for a given object type.

Namespace:  PostSharp.Serialization
Assembly:  PostSharp (in PostSharp.dll) Version: 6.10.5.0 (6.10.5.0)
Syntax
C#
Type GetSurrogateType(
	Type objectType
)

Parameters

objectType
Type: System.Type
Type of the object being serialized.

Return Value

Type: Type
The surrogate type for objectType, or null (or objectType) is objectType does not require a surrogate type.
Remarks

This method is called only during serialization. The surrogate type is the type whose name will be serialized; therefore, it will also be the type that will be deserialized.

It is not the responsibility of this class to call the next provider (NextProvider).

See Also