diff options
Diffstat (limited to 'main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs index 6de6830e73..a64fcab1f3 100644 --- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs +++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs @@ -835,14 +835,12 @@ namespace MonoDevelop.Projects.Formats.MSBuild { if (!StartHandlerHasExecuted) return; - if (EventArgs is ProjectStartedEventArgs) - ConsoleLogger.ProjectFinishedHandler (null, finished_args as ProjectFinishedEventArgs); - else if (EventArgs is TargetStartedEventArgs) - ConsoleLogger.TargetFinishedHandler (null, finished_args as TargetFinishedEventArgs); - else if (EventArgs is TaskStartedEventArgs) - ConsoleLogger.TaskFinishedHandler (null, finished_args as TaskFinishedEventArgs); - else if (!(EventArgs is BuildStartedEventArgs)) - throw new InvalidOperationException ("Unexpected event on the stack, type: " + EventArgs.GetType ()); + if (EventArgs is ProjectStartedEventArgs && finished_args is ProjectFinishedEventArgs) + ConsoleLogger.ProjectFinishedHandler (null, (ProjectFinishedEventArgs) finished_args); + else if (EventArgs is TargetStartedEventArgs && finished_args is TargetFinishedEventArgs) + ConsoleLogger.TargetFinishedHandler (null, (TargetFinishedEventArgs)finished_args); + else if (EventArgs is TaskStartedEventArgs && finished_args is TaskFinishedEventArgs) + ConsoleLogger.TaskFinishedHandler (null, (TaskFinishedEventArgs)finished_args); } } |