Esempio n. 1
0
        public virtual ICodeLexer GetLexer(string editorKey)
        {
            ICodeLexer lexer;

            LexerInstances.TryGetValue(editorKey, out lexer);
            return(lexer);
        }
Esempio n. 2
0
        public override void Initialize(IApp app)
        {
            base.Initialize(app);

            Lexers.ForEach(b =>
            {
                var iface = default(Type);

                if ((iface = b.Type.GetInterface(typeof(ICodeLexer).FullName)) == null)
                {
                    throw new ElideException("ICodeLexer '{0}' doesn't implement ICodeLexer interface.", b.Type);
                }

                LexerInstances.Add(b.Key, TypeCreator.New <ICodeLexer>(b.Type));
            });
        }