//// private static bool DetectGithub(Mod mod) { if (ModFeaturesHelpers.GetGithubUserNameProp(mod) == null) { return(false); } if (ModFeaturesHelpers.GetGitubProjectNameProp(mod) == null) { return(false); } return(true); }
//////////////// /// <summary> /// Gets a mod's github user name, if defined. /// </summary> /// <param name="mod"></param> /// <returns></returns> public static string GetGithubUserName(Mod mod) { var self = ModHelpersMod.Instance.ModFeaturesHelpers; if (!self.GithubMods.ContainsKey(mod.Name)) { return(null); } PropertyInfo gitUserProp = ModFeaturesHelpers.GetGithubUserNameProp(mod); return((string)gitUserProp.GetValue(null)); }