/// <summary> /// Initialize the internal event source which is used to raise events on loggers registered to this submission /// </summary> private void InitializeInternalEventSource() { _anyEventHandler = new AnyEventHandler(RaiseAnyEvent); _buildFinishedEventHandler = new BuildFinishedEventHandler(RaiseBuildFinishedEvent); _buildStartedEventHandler = new BuildStartedEventHandler(RaiseBuildStartedEvent); _customBuildEventHandler = new CustomBuildEventHandler(RaiseCustomEvent); _buildErrorEventHandler = new BuildErrorEventHandler(RaiseErrorEvent); _buildMessageEventHandler = new BuildMessageEventHandler(RaiseMessageEvent); _projectFinishedEventHandler = new ProjectFinishedEventHandler(RaiseProjectFinishedEvent); _projectStartedEventHandler = new ProjectStartedEventHandler(RaiseProjectStartedEvent); _buildStatusEventHandler = new BuildStatusEventHandler(RaiseStatusEvent); _targetFinishedEventHandler = new TargetFinishedEventHandler(RaiseTargetFinishedEvent); _targetStartedEventHandler = new TargetStartedEventHandler(RaiseTargetStartedEvent); _taskFinishedEventHandler = new TaskFinishedEventHandler(RaiseTaskFinishedEvent); _taskStartedEventHandler = new TaskStartedEventHandler(RaiseTaskStartedEvent); _buildWarningEventHandler = new BuildWarningEventHandler(RaiseWarningEvent); _eventSourceForBuild.AnyEventRaised += _anyEventHandler; _eventSourceForBuild.BuildFinished += _buildFinishedEventHandler; _eventSourceForBuild.BuildStarted += _buildStartedEventHandler; _eventSourceForBuild.CustomEventRaised += _customBuildEventHandler; _eventSourceForBuild.ErrorRaised += _buildErrorEventHandler; _eventSourceForBuild.MessageRaised += _buildMessageEventHandler; _eventSourceForBuild.ProjectFinished += _projectFinishedEventHandler; _eventSourceForBuild.ProjectStarted += _projectStartedEventHandler; _eventSourceForBuild.StatusEventRaised += _buildStatusEventHandler; _eventSourceForBuild.TargetFinished += _targetFinishedEventHandler; _eventSourceForBuild.TargetStarted += _targetStartedEventHandler; _eventSourceForBuild.TaskFinished += _taskFinishedEventHandler; _eventSourceForBuild.TaskStarted += _taskStartedEventHandler; _eventSourceForBuild.WarningRaised += _buildWarningEventHandler; }
/// <summary> /// Constructor. /// </summary> public MuxLogger() { _buildStartedEventHandler = new BuildStartedEventHandler(BuildStarted); _buildFinishedEventHandler = new BuildFinishedEventHandler(BuildFinished); _projectStartedEventHandler = new ProjectStartedEventHandler(ProjectStarted); _projectFinishedEventHandler = new ProjectFinishedEventHandler(ProjectFinished); }