private BcrReport.Tier FallBackTier(BcrReport.Tier current) { switch (current) { case BcrReport.Tier.Tier3: return(BcrReport.Tier.Tier4); case BcrReport.Tier.Tier4: return(BcrReport.Tier.CostCentre); default: throw new InvalidOperationException("Should not fall back"); } }
private Func <CostCentre, string> FallBackGroupingFunction(BcrReport.Tier current) { switch (current) { case BcrReport.Tier.Tier3: return(x => x.Tier4); case BcrReport.Tier.Tier4: return(x => x.Code); default: throw new InvalidOperationException("Should not fall back"); } }
public Report(BcrReport.Tier tier, IGrouping <string, CostCentre> hierarchy) { Tier = tier; _hierarchy = hierarchy; }