private static string getPrefix() { ConstantRepo cr = ConstantRepo.getInstance(); string prefix = cr.opt("surfm.yoar.poker.prefix", DEFAULT_PREFIX); return(prefix); }
internal static ActivityConfig LoadFromRepo() { ActivityConfig ans = new ActivityConfig(); ConstantRepo r = ConstantRepo.getInstance(); Type t = typeof(ActivityConfig); FieldInfo[] fis = t.GetFields(); foreach (FieldInfo fi in fis) { ConstAttribute ca = (ConstAttribute)Attribute.GetCustomAttribute(fi, typeof(ConstAttribute)); if (ca != null) { object o = r.opt <object>(ca.key, null); if (o != null) { fi.SetValue(ans, o); } } } return(ans); }