Class DataImportBehaviorBase
Base implementation of a data import behavior.
Inherited Members
Namespace: Kephas.Data.IO.Import
Assembly: Kephas.Data.IO.dll
Syntax
public abstract class DataImportBehaviorBase : Loggable, ILoggable, IDataImportBehavior
Methods
| Improve this Doc View SourceAfterPersistEntityAsync(IEntityEntry, IEntityEntry, IDataImportContext, CancellationToken)
Callback invoked after the converted entity has been persisted asynchronously.
Declaration
public Task AfterPersistEntityAsync(IEntityEntry importEntityEntry, IEntityEntry targetEntityEntry, IDataImportContext context, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityEntry | importEntityEntry | Information describing the entity to import. |
| IEntityEntry | targetEntityEntry | Information describing the converted entity to persist. |
| IDataImportContext | context | The context. |
| System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | The asynchronous result. |
AfterReadDataSourceAsync(DataStream, IDataImportContext, IList<Object>, CancellationToken)
Callback invoked before reading the data source asynchronously.
Declaration
public Task AfterReadDataSourceAsync(DataStream dataStream, IDataImportContext context, IList<object> sourceEntities, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| DataStream | dataStream | The data stream. |
| IDataImportContext | context | The context. |
| System.Collections.Generic.IList<System.Object> | sourceEntities | The source entities as deserialized from the data stream. |
| System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | The asynchronous result. |
BeforeConvertEntityAsync(IEntityEntry, IDataImportContext, CancellationToken)
Callback invoked before converting the entity to import asynchronously.
Declaration
public Task BeforeConvertEntityAsync(IEntityEntry importEntityEntry, IDataImportContext context, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityEntry | importEntityEntry | Information describing the entity to import. |
| IDataImportContext | context | The context. |
| System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | The asynchronous result. |
BeforePersistEntityAsync(IEntityEntry, IEntityEntry, IDataImportContext, CancellationToken)
Callback invoked before persisting the converted entity asynchronously.
Declaration
public Task BeforePersistEntityAsync(IEntityEntry importEntityEntry, IEntityEntry targetEntityEntry, IDataImportContext context, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityEntry | importEntityEntry | Information describing the entity to import. |
| IEntityEntry | targetEntityEntry | Information describing the converted entity to persist. |
| IDataImportContext | context | The context. |
| System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | The asynchronous result. |
BeforeReadDataSourceAsync(DataStream, IDataImportContext, CancellationToken)
Callback invoked before reading the data source asynchronously.
Declaration
public virtual Task BeforeReadDataSourceAsync(DataStream dataStream, IDataImportContext context, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| DataStream | dataStream | The data stream. |
| IDataImportContext | context | The context. |
| System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | The asynchronous result. |