public static TimeSpan Span(this TargetTimeline type) { switch (type) { case TargetTimeline.Cumulative: return(TimeSpan.MaxValue); case TargetTimeline.Daily: return(TimeSpan.FromDays(1)); case TargetTimeline.Monthly: return(TimeSpan.FromDays(30)); case TargetTimeline.SingleActivity: return(TimeSpan.FromDays(600)); case TargetTimeline.Weekly: return(TimeSpan.FromDays(7)); } throw new NotImplementedException(); }
public static string AsPostfix(this TargetTimeline type) { switch (type) { case TargetTimeline.Cumulative: return("ever"); case TargetTimeline.Daily: return("in a day"); case TargetTimeline.Monthly: return("in a month"); case TargetTimeline.SingleActivity: return("at once"); case TargetTimeline.Weekly: return("in a week"); } throw new NotImplementedException(); }