/// <summary> /// Gets a file engine. /// </summary> /// <typeparam name="TEntity">The type of record.</typeparam> /// <param name="engineFactory">The engine factory.</param> /// <param name="handleEntryReadError">The error handler.</param> /// <returns>A new file engine.</returns> public static IFlatFileEngine GetEngine <TEntity>( this IFlatFileEngineFactory <IDelimitedLayoutDescriptor, IDelimitedFieldSettingsContainer> engineFactory, FileReadErrorHandler?handleEntryReadError = null) where TEntity : class, new() { var descriptorProvider = new DelimitedLayoutDescriptorProvider(); var descriptor = descriptorProvider.GetDescriptor <TEntity>(); return(engineFactory.GetEngine(descriptor, handleEntryReadError)); }
/// <summary> /// Gets the engine. /// </summary> /// <typeparam name="TEntity">The type of the t entity.</typeparam> /// <param name="engineFactory">The engine factory.</param> /// <param name="handleEntryReadError">The handle entry read error.</param> /// <returns>IFlatFileEngine.</returns> public static IFlatFileEngine GetEngine <TEntity>( this IFlatFileEngineFactory <ILayoutDescriptor <IFixedFieldSettingsContainer>, IFixedFieldSettingsContainer> engineFactory, Func <string, Exception, bool> handleEntryReadError = null) where TEntity : class, new() { var descriptorProvider = new FixedLayoutDescriptorProvider(); var descriptor = descriptorProvider.GetDescriptor <TEntity>(); return(engineFactory.GetEngine(descriptor, handleEntryReadError)); }
public FixedLengthAttributeMappingIntegrationTests() { fileEngineFactory = new FixedLengthFileEngineFactory(); }
public DelimitedAttriubteMappingIntegrationTests() { _fileEngineFactory = new DelimitedFileEngineFactory(); }
public DelimitedAttributeMappingIntegrationTests() { _fileEngineFactory = new DelimitedFileEngineFactory(); }