public FlatFileToDataTablePusher(FlatFileToLoad fileToLoad, FlatFileColumnCollection headers, Func <string, object> hackValuesFunc, bool attemptToResolveNewlinesInRecords, CultureInfo culture) { _fileToLoad = fileToLoad; _headers = headers; _hackValuesFunc = hackValuesFunc; _attemptToResolveNewlinesInRecords = attemptToResolveNewlinesInRecords; _culture = culture ?? CultureInfo.CurrentCulture; typeDeciderFactory = new TypeDeciderFactory(_culture); }
public FlatFileToDataTablePusher(FlatFileToLoad fileToLoad, FlatFileColumnCollection headers, Func <string, object> hackValuesFunc, bool attemptToResolveNewlinesInRecords, CultureInfo culture) { _fileToLoad = fileToLoad; _headers = headers; _hackValuesFunc = hackValuesFunc; _attemptToResolveNewlinesInRecords = attemptToResolveNewlinesInRecords; _culture = culture; _dateTimeParser = new DateTimeTypeDecider(); if (culture != null) { _dateTimeParser.Culture = culture; } }
public FlatFileToDataTablePusher(FlatFileToLoad fileToLoad, FlatFileColumnCollection headers, Func <string, object> hackValuesFunc, bool attemptToResolveNewlinesInRecords, CultureInfo culture, string explicitDateTimeFormat) { _fileToLoad = fileToLoad; _headers = headers; _hackValuesFunc = hackValuesFunc; _attemptToResolveNewlinesInRecords = attemptToResolveNewlinesInRecords; _culture = culture ?? CultureInfo.CurrentCulture; _explicitDateTimeFormat = explicitDateTimeFormat; typeDeciderFactory = new TypeDeciderFactory(_culture); if (!string.IsNullOrWhiteSpace(explicitDateTimeFormat)) { typeDeciderFactory.Settings.ExplicitDateFormats = new [] { explicitDateTimeFormat } } ; }