Interface IDataImportBehavior
Application service contract for adding behaviors to the data import.
Namespace: Kephas.Data.IO.Import
Assembly: Kephas.Data.IO.dll
Syntax
[SingletonAppServiceContract(AllowMultiple = true)]
public interface IDataImportBehavior
Methods
| Improve this Doc View SourceAfterPersistEntityAsync(IEntityEntry, IEntityEntry, IDataImportContext, CancellationToken)
Callback invoked after the converted entity has been persisted asynchronously.
Declaration
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
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
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
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
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. |