private static Tuple <Int64, Int64, string> GetMinMaxMsg(dynamic config, DspPage pg) { Int64 min = config.Range.MinValue; Int64 max = config.Range.MaxValue; string msg = string.Empty; msg = string.Format(config.Range.ErrorMessage, min, max); return(Tuple.Create(min, max, msg)); }
private static dynamic GetConfig(DspPage page) { switch (page) { case DspPage.Login: return(ApplicationVariable.GetBrandConfig().LoginPage); case DspPage.Search: return(ApplicationVariable.GetBrandConfig().SearchPage); } return(null); }
public static Tuple <Int64, Int64, string> ConfigureFor(DspPage pageType) { var config = GetConfig(pageType); return(GetMinMaxMsg(config, pageType)); }
public DSPRangeAttribute(DspPage page) : this(ConfigureFor(page)) { this.ErrorMessage = ConfigureFor(page).Item3; }