public virtual ICodeLexer GetLexer(string editorKey) { ICodeLexer lexer; LexerInstances.TryGetValue(editorKey, out lexer); return(lexer); }
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)); }); }