Class AssemblyEmbeddedResourcesDataInstallerBase
An initial data handler base using the assembly embedded resources.
Inherited Members
Namespace: Kephas.Data.IO.Setup
Assembly: Kephas.Data.IO.dll
Syntax
public abstract class AssemblyEmbeddedResourcesDataInstallerBase : DataIOInstallerBase, ILoggable, IDataInstaller
Constructors
| Improve this Doc View SourceAssemblyEmbeddedResourcesDataInstallerBase(IDataImportService, IExportFactory<IDataSpace>)
Initializes a new instance of the AssemblyEmbeddedResourcesDataInstallerBase class.
Declaration
protected AssemblyEmbeddedResourcesDataInstallerBase(IDataImportService dataImportService, IExportFactory<IDataSpace> dataSpaceFactory)
Parameters
Type | Name | Description |
---|---|---|
IDataImportService | dataImportService | The data import service. |
IExportFactory<IDataSpace> | dataSpaceFactory | The data space factory. |
Remarks
The assembly containing the resources is the assembly where the data installer class is declared.
AssemblyEmbeddedResourcesDataInstallerBase(IDataImportService, IExportFactory<IDataSpace>, Assembly)
Initializes a new instance of the AssemblyEmbeddedResourcesDataInstallerBase class.
Declaration
protected AssemblyEmbeddedResourcesDataInstallerBase(IDataImportService dataImportService, IExportFactory<IDataSpace> dataSpaceFactory, Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
IDataImportService | dataImportService | The data import service. |
IExportFactory<IDataSpace> | dataSpaceFactory | The data space factory. |
System.Reflection.Assembly | assembly | The assembly containing the resources. |
Properties
| Improve this Doc View SourceResourcesAssembly
Gets or sets the assembly holding the resources.
Declaration
protected Assembly ResourcesAssembly { get; set; }
Property Value
Type | Description |
---|---|
System.Reflection.Assembly |
Methods
| Improve this Doc View SourceCreateDataSource(String)
Creates an output data source.
Declaration
protected override DataStream CreateDataSource(string dataFilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataFilePath | The data file path. |
Returns
Type | Description |
---|---|
DataStream | The new data source. |
Overrides
| Improve this Doc View SourceGetDataFilePaths(String, IEnumerable<String>)
Gets the data files to be imported for the provided operation namespace.
Declaration
protected virtual IEnumerable<string> GetDataFilePaths(string operationNamespace, IEnumerable<string> fileNames)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationNamespace | The operation namespace. |
System.Collections.Generic.IEnumerable<System.String> | fileNames | List of names of the files. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of file paths. |
GetDataFileResourceNamespace()
Gets the data file resource namespace.
Declaration
protected virtual string GetDataFileResourceNamespace()
Returns
Type | Description |
---|---|
System.String | The data file resource namespace. |
GetInstallDataFileNames()
Gets the file names of the data to be installed.
Declaration
protected virtual IEnumerable<string> GetInstallDataFileNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of file names. |
Remarks
When overridden in a derived class, the file names should not contain the resource namespace, because it will be prepended by the GetInstallDataFilePaths(). Also, the file names should be provided in the right order for the import.
GetInstallDataFilePaths()
Gets the files for the data to be installed.
Declaration
protected override IEnumerable<string> GetInstallDataFilePaths()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of file paths. |
Overrides
| Improve this Doc View SourceGetUninstallDataFileNames()
Gets the data file names of the data to be uninstalled.
Declaration
protected virtual IEnumerable<string> GetUninstallDataFileNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of file names. |
Remarks
When overridden in a derived class, the file names should not contain the resource namespace, because it will be prepended by the GetInstallDataFilePaths(). Also, the file names should be provided in the right order for the import.
GetUninstallDataFilePaths()
Gets the files for the data to be uninstalled.
Declaration
protected override IEnumerable<string> GetUninstallDataFilePaths()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of file paths. |