PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Serialization Namespace / ISerializer Interface / ISerializer Methods / ISerializer.​Create­Instance Method

ISerializer.CreateInstance Method

Creates an instance of the given type.

Namespace:  PostSharp.Serialization
Assembly:  PostSharp (in PostSharp.dll) Version: 6.10.10.0 (6.10.10.0)
Syntax
C#
Object CreateInstance(
	Type type,
	IArgumentsReader constructorArguments
)

Parameters

type
Type: System.Type
Type of the instance to be created.
constructorArguments
Type: PostSharp.Serialization.IArgumentsReader
Gives access to arguments required to create the instance.

Return Value

Type: Object
An instance of type type initialized using constructorArguments.
Remarks

This method is invoked during deserialization. If IsTwoPhase is true, the DeserializeFields(Object, IArgumentsReader) method is called later to complete deserialization.

See Also