Interface IConvert<TFrom, TTo>
Interface which converts one type into another, or a list of that type into a list of the resulting type. Commonly used to convert entities to dictionaries etc.
[InternalApi_DoNotUse_MayChangeWithoutNotice("Just FYI to understand the internals. It will probably be moved elsewhere in the namespace some day. ")]
public interface IConvert<in TFrom, out TTo>
Type Parameters
TFromThe source type of this conversion
TToThe target type for this conversion
Methods
Convert(IEnumerable<TFrom>)
Return a list of converted objects - usually prepared for serialization or similar
IEnumerable<out TTo> Convert(IEnumerable<in TFrom> list)
Parameters
listIEnumerable<TFrom>
Returns
- IEnumerable<TTo>
Convert(TFrom)
Convert a single item to the target type - usually prepared for serialization or similar
TTo Convert(TFrom item)
Parameters
itemTFrom
Returns
- TTo