/// <summary> /// Dispose the intake supplier, such as reader reading from a file /// </summary> internal void DisposeIntake() { //This method gets called from EtlOrchestrator when intake is done for any reason incl. cancellation if (_intakeFromReader) { _intakeReader?.Dispose(); //note that reader can be null if ConfigRejected } else //intake from IntakeSupplier (or IntakeSupplierAsync) function { try { _config.IntakeDisposer(_globalCache); } catch (Exception ex) { //errors during disposal are logged, but otherwise ignored _config.Logger.LogError("Error occurred during intake disposal (IntakeDisposer function).", ex); } } }