Class DataConverterBase<TSource, TTarget>
A data converter base.
Inheritance
System.Object
DataConverterBase<TSource, TTarget>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data.Conversion
Assembly: Kephas.Data.dll
Syntax
public abstract class DataConverterBase<TSource, TTarget> : IDataConverter<TSource, TTarget>, IDataConverter
Type Parameters
Name | Description |
---|---|
TSource | Type of the source. |
TTarget | Type of the target. |
Methods
| Improve this Doc View SourceConvertAsync(TSource, TTarget, IDataConversionContext, CancellationToken)
Converts the source object to the target object asynchronously.
Declaration
public abstract Task<IDataConversionResult> ConvertAsync(TSource source, TTarget target, IDataConversionContext conversionContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
TSource | source | The source object. |
TTarget | target | The target object. |
IDataConversionContext | conversionContext | The conversion context. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IDataConversionResult> | A data conversion result. |
ConvertAsync(Object, Object, IDataConversionContext, CancellationToken)
Converts the source object to the target object asynchronously.
Declaration
public Task<IDataConversionResult> ConvertAsync(object source, object target, IDataConversionContext conversionContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | The source object. |
System.Object | target | The target object. |
IDataConversionContext | conversionContext | The conversion context. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IDataConversionResult> | A data conversion result. |