示例#1
0
 public ILexerConfig this[string lexerName]
 {
     get
     {
         return(this[(int)LexerConfig.GetLexerFromName(lexerName)]);
     }
 }
        public ILexerConfig this[int lexerId]
        {
            get
            {
                LexerConfig config = null;
                if (!lexers.ContainsKey(lexerId))
                {
                    config = new LexerConfig(lexerId);
                    AddDefaultStylesToLexer(config);

                    if (provider.PopulateLexerConfig(config))
                    {
                        lexers[lexerId] = config;
                    }
                    else
                    {
                        config = null;
                    }
                }
                else
                {
                    config = lexers[lexerId];
                }
                return(config);
            }
        }
示例#3
0
 public ILexerConfig this[int lexerId]
 {
     get
     {
         LexerConfig config = null;
         if (!lexers.ContainsKey(lexerId))
         {
             config          = new LexerConfig(parent, lexerId);
             lexers[lexerId] = config;
             if (!provider.PopulateLexerConfig(config))
             {
                 config = null;
                 lexers.Remove(lexerId);
             }
         }
         else
         {
             config = lexers[lexerId];
         }
         return(config);
     }
 }
 public ILexerConfig this[int lexerId]
 {
     get
     {
         LexerConfig config = null;
         if (!lexers.ContainsKey(lexerId))
         {
             config = new LexerConfig(parent, lexerId);
             lexers[lexerId] = config;
             if (!provider.PopulateLexerConfig(config))
             {
                 config = null;
                 lexers.Remove(lexerId);
             }
         }
         else
         {
             config = lexers[lexerId];
         }
         return config;
     }
 }
示例#5
0
        public ILexerConfig this[int lexerId]
        {
            get
            {
                LexerConfig config = null;
                if (!lexers.ContainsKey(lexerId))
                {
                    config = new LexerConfig(lexerId);
                    AddDefaultStylesToLexer(config);

                    if (provider.PopulateLexerConfig(config))
                        lexers[lexerId] = config;
                    else
                        config = null;
                }
                else
                {
                    config = lexers[lexerId];
                }
                return config;
            }
        }