Click or drag to resize
SerializerGeneratorGenerateSerializerCodeAssembly Method (SerializerAssemblyGenerationConfiguration, Type)
Generates an assembly which contains auto-generated serializer types for specified types.

Namespace: MsgPack.Serialization
Assembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax
public static IEnumerable<SerializerCodeGenerationResult> GenerateSerializerCodeAssembly(
	SerializerAssemblyGenerationConfiguration configuration,
	params Type[] targetTypes
)

Parameters

configuration
Type: MsgPack.SerializationSerializerAssemblyGenerationConfiguration
The SerializerAssemblyGenerationConfiguration which holds required AssemblyName and optional settings.
targetTypes
Type: SystemType
The target types where serializer types to be generated.

Return Value

Type: IEnumerableSerializerCodeGenerationResult
A SerializerCodeGenerationResult collection which correspond to codes generated to targetTypes. All FilePath properties of items will be same and will point to generated DLL file.
Exceptions
ExceptionCondition
ArgumentNullExceptionconfiguration is null. Or, targetTypes is null.
InvalidOperationExceptionAssemblyName of configuration is not set correctly.
SerializationExceptionFailed to generate a serializer because of targetTypes.
Remarks
Serializer types for dependent types which are refered from specified targetTypes are automatically generated.
See Also