public static BudgetOutput CreateBudgetOutput(string concept, decimal total, OutputTypes.TaskType type, Budget budget) { return(new BudgetOutput() { Concept = concept, Total = total, Type = ResolveType(type), Budget = budget }); }
private static string ResolveType(OutputTypes.TaskType type) { switch (type) { case OutputTypes.TaskType.TaskList: return("TaskList"); case OutputTypes.TaskType.Task: return("Task"); case OutputTypes.TaskType.Other: return("Other"); default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } }