public void Handle(BuildEvent @event) { switch (@event.Type) { case BuildEventType.Message: HandleMessage((MessageEvent)@event); break; case BuildEventType.StartTarget: HandleStartTarget(((StartTargetEvent)@event).Target); break; case BuildEventType.StopTarget: HandleStopTarget(((StopTargetEvent)@event).Target); break; case BuildEventType.StartTask: case BuildEventType.StopTask: case BuildEventType.StartBuild: return; case BuildEventType.StopBuild: PrintSummary((StopBuildEvent)@event); return; } }
public void Handle(BuildEvent @event) { switch (@event.Type) { case BuildEventType.Message: Handle((MessageEvent)@event); break; case BuildEventType.StartBuild: Handle((StartBuildEvent)@event); return; case BuildEventType.StopBuild: Handle((StopBuildEvent)@event); return; case BuildEventType.StartTarget: Handle((StartTargetEvent)@event); return; case BuildEventType.StopTarget: Handle((StopTargetEvent)@event); return; case BuildEventType.StartTask: Handle((StartTaskEvent)@event); return; case BuildEventType.StopTask: Handle((StopTaskEvent)@event); return; } }
public StartStop(Tracer tracer, BuildEvent @event) { _tracer = tracer; _event = @event; }
private void Publish(BuildEvent @event) { Listeners.Each(x => x.Handle(@event)); }