public void RegisterSyntaxTreeHandler(BackgroundParserHandlerPriority priority, IBackgroundParserSyntaxTreeHandler handler) { List <IBackgroundParserSyntaxTreeHandler> handlerList; if (!_syntaxTreeAvailableEventHandlers.TryGetValue(priority, out handlerList)) { _syntaxTreeAvailableEventHandlers.Add(priority, handlerList = new List <IBackgroundParserSyntaxTreeHandler>()); } handlerList.Add(handler); }
public void RegisterSyntaxTreeHandler(BackgroundParserHandlerPriority priority, IBackgroundParserSyntaxTreeHandler handler) { List<IBackgroundParserSyntaxTreeHandler> handlerList; if (!_syntaxTreeAvailableEventHandlers.TryGetValue(priority, out handlerList)) _syntaxTreeAvailableEventHandlers.Add(priority, handlerList = new List<IBackgroundParserSyntaxTreeHandler>()); handlerList.Add(handler); }