private void HandleParsedLineReceived(ParsedLineEventArgs parsedLine) { this.OnParsedLineReceived(parsedLine); if (parsedLine.PreventProcessing) { return; } var eventArgs = new ParameterEventReceivedEventArgs(parsedLine.Parameter, parsedLine.Id); this.Events[parsedLine.Command].OnEvent(eventArgs); if (eventArgs.PreventProcessing) { return; } if (parsedLine.Command == "_") { this.OnAnswerReceived(parsedLine); if (parsedLine.PreventProcessing) { return; } List <Action <ParsedLineEventArgs> > onAnswerList; if (this.onAnswerDelegates.TryGetValue(parsedLine.Id, out onAnswerList)) { foreach (var action in onAnswerList) { action.BeginInvoke(parsedLine, null, null); } } } }
internal void OnEvent(ParameterEventReceivedEventArgs e) { EventHandler <ParameterEventReceivedEventArgs> handler = this.Event; if (handler != null) { foreach ( var singleHandler in (EventHandler <ParameterEventReceivedEventArgs>[])handler.GetInvocationList()) { if (e.PreventProcessing) { return; } singleHandler(this, e); } } }
internal void OnEvent(ParameterEventReceivedEventArgs e) { EventHandler<ParameterEventReceivedEventArgs> handler = this.Event; if (handler != null) { foreach ( var singleHandler in (EventHandler<ParameterEventReceivedEventArgs>[])handler.GetInvocationList()) { if (e.PreventProcessing) { return; } singleHandler(this, e); } } }
private void HandleParsedLineReceived(ParsedLineEventArgs parsedLine) { this.OnParsedLineReceived(parsedLine); if (parsedLine.PreventProcessing) { return; } var eventArgs = new ParameterEventReceivedEventArgs(parsedLine.Parameter, parsedLine.Id); this.Events[parsedLine.Command].OnEvent(eventArgs); if (eventArgs.PreventProcessing) { return; } if (parsedLine.Command == "_") { this.OnAnswerReceived(parsedLine); if (parsedLine.PreventProcessing) { return; } List<Action<ParsedLineEventArgs>> onAnswerList; if (this.onAnswerDelegates.TryGetValue(parsedLine.Id, out onAnswerList)) { foreach (var action in onAnswerList) { action.BeginInvoke(parsedLine, null, null); } } } }