private void AddMagicBoxGroup(List<MagicBoxOrder> mgcBoxOrderList, IGrouping<DateTime, EconomicEvent> eventGroup) { // refactor the this events var currencyPairsCandidate = new List<MagicBoxOrder>(); foreach (var economicEvent in eventGroup.Distinct()) { currencyPairsCandidate.Add(new MagicBoxOrder { Symbol = economicEvent.Currency, LotSize = 1, Config = speechCfg, NewsTime = economicEvent.DateTime }); } mgcBoxOrderList.AddRange(currencyPairsCandidate.Distinct()); }
private void AddMagicBoxGroup(List <MagicBoxOrder> mgcBoxOrderList, IGrouping <DateTime, EconomicEvent> eventGroup) { // refactor the this events var currencyPairsCandidate = new List <MagicBoxOrder>(); foreach (EconomicEvent economicEvent in eventGroup.Distinct()) { currencyPairsCandidate.Add(new MagicBoxOrder { Symbol = economicEvent.Currency, LotSize = 1, Config = speechCfg, NewsTime = economicEvent.DateTime }); } mgcBoxOrderList.AddRange(currencyPairsCandidate.Distinct()); }
private int CountRowsBelow <T> (IGrouping <T, AclExpansionEntry> grouping) { return(grouping.Distinct(AclExpansionEntryIgnoreStateEqualityComparer).Count()); }