Class DataIOInstallerBase
An initial data i/o handler base.
Inheritance
Inherited Members
Namespace: Kephas.Data.IO.Setup
Assembly: Kephas.Data.IO.dll
Syntax
public abstract class DataIOInstallerBase : Loggable, ILoggable, IDataInstaller
Constructors
| Improve this Doc View SourceDataIOInstallerBase(IDataImportService, IExportFactory<IDataSpace>)
Initializes a new instance of the DataIOInstallerBase class.
Declaration
protected DataIOInstallerBase(IDataImportService dataImportService, IExportFactory<IDataSpace> dataSpaceFactory)
Parameters
Type | Name | Description |
---|---|---|
IDataImportService | dataImportService | The data import service. |
IExportFactory<IDataSpace> | dataSpaceFactory | The data space factory. |
Properties
| Improve this Doc View SourceDataImportService
Gets the data import service.
Declaration
public IDataImportService DataImportService { get; }
Property Value
Type | Description |
---|---|
IDataImportService | The data import service. |
DataSpaceFactory
Gets the data space factory.
Declaration
public IExportFactory<IDataSpace> DataSpaceFactory { get; }
Property Value
Type | Description |
---|---|
IExportFactory<IDataSpace> | The data space factory. |
Methods
| Improve this Doc View SourceCreateDataImportContext(IDataSetupContext, IDataSpace)
Creates the data import context.
Declaration
protected virtual IDataImportContext CreateDataImportContext(IDataSetupContext dataSetupContext, IDataSpace dataSpace)
Parameters
Type | Name | Description |
---|---|---|
IDataSetupContext | dataSetupContext | Context for the initial data. |
IDataSpace | dataSpace | The data space. |
Returns
Type | Description |
---|---|
IDataImportContext | The new data import context. |
CreateDataSource(String)
Creates a data source for the import operation.
Declaration
protected virtual DataStream CreateDataSource(string dataFilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataFilePath | The data file path. |
Returns
Type | Description |
---|---|
DataStream | The new data source. |
GetInstallDataFilePaths()
Gets the files containing data to be installed.
Declaration
protected virtual IEnumerable<string> GetInstallDataFilePaths()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of file paths. |
GetUninstallDataFilePaths()
Gets the files containing data to be uninstalled.
Declaration
protected virtual IEnumerable<string> GetUninstallDataFilePaths()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of file paths. collection. |
ImportDataAsync(IDataSetupContext, IEnumerable<String>, CancellationToken)
Imports the data contained in the provided files asynchronously.
Declaration
protected virtual Task<IOperationResult> ImportDataAsync(IDataSetupContext dataSetupContext, IEnumerable<string> dataFilePaths, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IDataSetupContext | dataSetupContext | Context for the initial data. |
System.Collections.Generic.IEnumerable<System.String> | dataFilePaths | The data file paths. |
System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IOperationResult> | An asynchronous result returning the data setup result. |
ImportDataFileAsync(IDataSetupContext, String, CancellationToken)
Import data file asynchronously.
Declaration
protected virtual Task<IOperationResult> ImportDataFileAsync(IDataSetupContext dataSetupContext, string dataFilePath, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IDataSetupContext | dataSetupContext | Context for the initial data. |
System.String | dataFilePath | The data file path. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IOperationResult> | The asynchronous result returning the data import result. |
InstallDataAsync(IDataSetupContext, CancellationToken)
Installs the data asynchronously.
Declaration
public virtual Task<IOperationResult> InstallDataAsync(IDataSetupContext dataSetupContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IDataSetupContext | dataSetupContext | Context for the data setup. |
System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IOperationResult> | An asynchronous result returning the data creation result. |
UninstallDataAsync(IDataSetupContext, CancellationToken)
Uninstalls the data asynchronously.
Declaration
public virtual Task<IOperationResult> UninstallDataAsync(IDataSetupContext dataSetupContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IDataSetupContext | dataSetupContext | Context for the data setup. |
System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IOperationResult> | An asynchronous result returning the data creation result. |