public GroupDataProvider(IEnumerable <InternalOrder> orders, IEnumerable <InternalOrder> groupOrders, IEnumerable <InternalCalculation> calculations, IDefoConfiguration config) { _config = config; this.orders = BuildOrders(orders); this.groupOrders = BuildOrders(groupOrders); this.calculations = calculations; }
public DummyDataProvider(DateTime start, string ordersPath, string inflationPath, IDefoConfiguration config) { _config = config; DateTime date = new DateTime(start.Year, start.Month, 1); _inflationCoefs = ParseInflations(inflationPath).Where(c => c.Date < date).OrderBy(c => c.Date).ToList(); CalculatePlanedInflation(date); this._orders = this.BuildOrders(start, ParseOrders(ordersPath).ToList()); this.BuildFilteredOrders(); }
public DummyDataProvider(DateTime start, IEnumerable <InflationCoef> inflationCoefs, IEnumerable <InternalOrder> orders, IDefoConfiguration config, IEnumerable <InternalEvent> events = null, IEnumerable <InternalParserRoomData> parserRoomData = null) { _parserRoomData = parserRoomData; this._config = config; this._events = events; DateTime date = new DateTime(start.Year, start.Month, 1); this._inflationCoefs = inflationCoefs.Where(c => c.Date < date).OrderBy(c => c.Date).ToList(); CalculatePlanedInflation(date); foreach (InternalOrder internalOrder in orders) { this.BuildOrder(internalOrder, true); } this._orders = this.BuildOrders(start, orders); this.BuildFilteredOrders(); }