public OrderCalculatorService(Argument argument) { this._argument = argument ?? throw new ArgumentNullException(nameof(argument)); this._argument.EnsureValues(); this._unitOfWork = InMemoryHelper.InMemoryReadonlyCsvUnitOfWork(this._argument.CatalogFile); this._settings = Settings.Instance; }
protected virtual void Dispose(bool disposing) { if (!this._disposed) { if (disposing) { if (this._argument != null) { this._argument.Destroy(); this._argument = null; } if (this._unitOfWork != null) { this._unitOfWork.Dispose(); this._unitOfWork = null; } } } this._disposed = true; }