public static IEnumerable <GitHubMentionConfiguration.Repository>?GetRepositoriesForGuild (this GitHubMentionConfiguration configuration, IGuild guild) { var configGuild = configuration.Guilds.FirstOrDefault(g => g.Id == guild.Id); return(configGuild?.Repositories ?? configuration.DefaultRepositories); }
public GitHubMentionExtractor(GitHubMentionConfiguration mentionConfiguration, IMapper mapper) { _mentionConfiguration = mentionConfiguration; _mapper = mapper; }