Click or drag to resize

FormatConverterT, TFormatTypeRegisterConversion Method (TFormatType, TFormatType, FormatConversionCallbackT, TFormatType)

Registers a conversion between formats.

Namespace:  AGI.Foundation.Infrastructure
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.1.418.0 (24.1.418.0)
Syntax
public void RegisterConversion(
	TFormatType from,
	TFormatType to,
	FormatConversionCallback<T, TFormatType> conversion
)

Parameters

from
Type: TFormatType
The source format.
to
Type: TFormatType
The destination format.
conversion
Type: AGI.Foundation.InfrastructureFormatConversionCallbackT, TFormatType
A delegate referring to a function to convert from from to to.
Exceptions
ExceptionCondition
ArgumentException Thrown when registering a conversion between identical formats. The parameters from and to cannot be equal.
See Also