private void AddExtractorItem(string language, CodeSnippetExtrator extractor) { if (CodeLanguageExtractors.ContainsKey(language)) { CodeLanguageExtractors[language].Add(extractor); } else { CodeLanguageExtractors[language] = new List <CodeSnippetExtrator> { extractor }; } }
private void AddExtractorItems(string[] languages, CodeSnippetExtrator extractor) { foreach (var language in languages) { AddExtractorItem(language, extractor); if (LanguageAlias.ContainsKey(language)) { foreach (var alias in LanguageAlias[language]) { AddExtractorItem(alias, extractor); } } } }