Click or drag to resize

DataConverterCanConvertTo Method

Returns whether this converter can convert an object to the specified type.

Namespace: Demo3D.PLC.Comms
Assembly: PLC (in PLC.dll) Version: 19.00.00
Syntax
C#
public virtual bool CanConvertTo(
	IDataContextProvider? contextProvider,
	DataType destinationType,
	DataType sourceType
)

Parameters

contextProvider  IDataContextProvider
Conversion context provider (or null).
destinationType  DataType
The data type to be converted to.
sourceType  DataType
The data type to convert from.

Return Value

Boolean
True is this converter can perform the conversion.
Remarks

When setting up a conversion, the contextProvider passed to this function and to GetConvertTo(IDataContextProvider, DataType, DataType) and to the ConversionDelegate returned, must all be the same.

Each instance of the IDataContextProvider is supposed to provide the context for one particular conversion for one particular data stream.

See Also