コード例 #1
0
 public void Register(LanguageDefinition language, params string[] extensions)
 {
     foreach (var extension in extensions)
     {
         if (!LanguageDefinitions.ContainsKey(extension))
         {
             LanguageDefinitions.Add(extension, language);
         }
     }
 }
コード例 #2
0
        public LanguageDefinition GetLanguage(string extension)
        {
            LanguageDefinition languageDefinition;

            if (!LanguageDefinitions.TryGetValue(extension, out languageDefinition))
            {
                languageDefinition = new LanguageDefinition("Null", Lexer.Null);
            }

            return(languageDefinition);
        }