コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }