public OrderFileStorageProcessFactory( IConsole console, IOrderFileToOrderSerialiser orderSerialiser, ILogger logger) { this._console = console ?? throw new ArgumentNullException(nameof(console)); this._orderSerialiser = orderSerialiser ?? throw new ArgumentNullException(nameof(orderSerialiser)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public UploadTradeFileProcessor( IOrderFileToOrderSerialiser csvToDtoMapper, IOrderFileValidator tradeFileCsvValidator, ILogger <UploadTradeFileProcessor> logger) : base(logger) { this._orderFileSerialiser = csvToDtoMapper ?? throw new ArgumentNullException(nameof(csvToDtoMapper)); this._orderFileValidator = tradeFileCsvValidator ?? throw new ArgumentNullException(nameof(tradeFileCsvValidator)); }
public TradingFileDataImportProcess( ILogger logger, IOrderFileToOrderSerialiser orderFileToOrderSerialiser, string filePath) : base(logger, new StubTradeStrategy()) { this._orderFileToOrderSerialiser = orderFileToOrderSerialiser ?? throw new ArgumentNullException(nameof(orderFileToOrderSerialiser)); this._filePath = filePath ?? string.Empty; }
public UploadEtlFileProcessor( IOrderFileToOrderSerialiser orderFileSerialiser, IEtlFileValidator etlFileValidator, IEtlUploadErrorStore etlUploadErrorStore, IUploadConfiguration configuration, IEmailNotificationMessageSender messageSender, ILogger <UploadEtlFileProcessor> logger) : base(logger) { this._orderFileSerialiser = orderFileSerialiser ?? throw new ArgumentNullException(nameof(orderFileSerialiser)); this._etlFileValidator = etlFileValidator ?? throw new ArgumentNullException(nameof(etlFileValidator)); this._etlUploadErrorStore = etlUploadErrorStore ?? throw new ArgumentNullException(nameof(etlUploadErrorStore)); this._configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); this._messageSender = messageSender ?? throw new ArgumentNullException(nameof(messageSender)); }
public OrderFileStorageProcess( string storagePath, IConsole console, IOrderFileToOrderSerialiser orderSerialiser, ILogger logger) { this._storagePath = storagePath ?? "GeneratedOrderFiles"; this._console = console ?? throw new ArgumentNullException(nameof(console)); this._orderSerialiser = orderSerialiser ?? throw new ArgumentNullException(nameof(orderSerialiser)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); this._frames = new List <Order>(); this._timerInitiated = false; this._fileStamp = $"TradeFile-{DateTime.UtcNow.Ticks}-{Guid.NewGuid()}.csv"; this._timer = new Timer { AutoReset = false, Interval = 30 * 1000 }; this._timer.Elapsed += this.OnElapse; this.Initialise(); }