/// <summary> /// Raise one of the events that is appropriate for the type of the BuildEventArgs /// </summary> public void Dispatch(BuildEventArgs buildEvent) { if (buildEvent is BuildMessageEventArgs) { MessageRaised?.Invoke(null, (BuildMessageEventArgs)buildEvent); } else if (buildEvent is TaskStartedEventArgs) { TaskStarted?.Invoke(null, (TaskStartedEventArgs)buildEvent); } else if (buildEvent is TaskFinishedEventArgs) { TaskFinished?.Invoke(null, (TaskFinishedEventArgs)buildEvent); } else if (buildEvent is TargetStartedEventArgs) { TargetStarted?.Invoke(null, (TargetStartedEventArgs)buildEvent); } else if (buildEvent is TargetFinishedEventArgs) { TargetFinished?.Invoke(null, (TargetFinishedEventArgs)buildEvent); } else if (buildEvent is ProjectStartedEventArgs) { ProjectStarted?.Invoke(null, (ProjectStartedEventArgs)buildEvent); } else if (buildEvent is ProjectFinishedEventArgs) { ProjectFinished?.Invoke(null, (ProjectFinishedEventArgs)buildEvent); } else if (buildEvent is BuildStartedEventArgs) { BuildStarted?.Invoke(null, (BuildStartedEventArgs)buildEvent); } else if (buildEvent is BuildFinishedEventArgs) { BuildFinished?.Invoke(null, (BuildFinishedEventArgs)buildEvent); } else if (buildEvent is CustomBuildEventArgs) { CustomEventRaised?.Invoke(null, (CustomBuildEventArgs)buildEvent); } else if (buildEvent is BuildStatusEventArgs) { StatusEventRaised?.Invoke(null, (BuildStatusEventArgs)buildEvent); } else if (buildEvent is BuildWarningEventArgs) { WarningRaised?.Invoke(null, (BuildWarningEventArgs)buildEvent); } else if (buildEvent is BuildErrorEventArgs) { ErrorRaised?.Invoke(null, (BuildErrorEventArgs)buildEvent); } AnyEventRaised?.Invoke(null, buildEvent); }
public void LogCustomEvent(CustomBuildEventArgs args) { CustomEventRaised?.Invoke(this, args); AnyEventRaised?.Invoke(this, args); }
public void LogMessageEvent(BuildMessageEventArgs args) { MessageRaised?.Invoke(this, args); AnyEventRaised?.Invoke(this, args); }
public void LogWarningEvent(BuildWarningEventArgs args) { WarningRaised?.Invoke(this, args); AnyEventRaised?.Invoke(this, args); }
#pragma warning restore 0067 public void LogErrorEvent(BuildErrorEventArgs args) { ErrorRaised?.Invoke(this, args); AnyEventRaised?.Invoke(this, args); }
public void RaiseEvent(object sender, BuildEventArgs args) => AnyEventRaised?.Invoke(sender, args);
// ReSharper disable once UnusedMember.Local private void OnAnyEventRaised(BuildEventArgs e) { AnyEventRaised?.Invoke(this, e); }
private void EventSourceOnAnyEventRaised(object sender, BuildEventArgs e) { AnyEventRaised?.Invoke(sender, e); }
public void RaiseBuildFinished() => AnyEventRaised?.Invoke(this, new BuildFinishedEventArgs("Build Started", "", true));
public void RaiseBuildStart() => AnyEventRaised?.Invoke(this, new BuildStartedEventArgs("Build Started", "", DateTime.Now));
public void RaiseError(string senderName, string message) => AnyEventRaised?.Invoke(this, new BuildErrorEventArgs("", "", "", 0, 0, 0, 0, message, "", senderName));
public void RaiseMessage(string senderName, string message, MessageImportance importance) => AnyEventRaised?.Invoke(this, new BuildMessageEventArgs(message, "", senderName, importance));