Esempio n. 1
0
 private void AddExtractorItem(string language, CodeSnippetExtrator extractor)
 {
     if (CodeLanguageExtractors.ContainsKey(language))
     {
         CodeLanguageExtractors[language].Add(extractor);
     }
     else
     {
         CodeLanguageExtractors[language] = new List <CodeSnippetExtrator> {
             extractor
         };
     }
 }
Esempio n. 2
0
        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);
                    }
                }
            }
        }