/// <summary>
 /// Raises the <see cref="BuildStarted"/> event.
 ///
 /// You do not need to call this method if you use BuildEngine.BuildInGui - the build
 /// engine will call these events itself.
 /// </summary>
 public static void RaiseEventBuildStarted(BuildEventArgs e)
 {
     if (e == null)
     {
         throw new ArgumentNullException("e");
     }
     WorkbenchSingleton.AssertMainThread();
     building = true;
     BuildStarted.RaiseEvent(null, e);
 }
        private static void OnPreProcessBuild(BuildInfo buildInfo)
        {
            // Raise the global event for listeners
            BuildStarted.RaiseEvent(buildInfo);

            // Call the pre-build action, if any
            if (buildInfo.PreBuildAction != null)
            {
                buildInfo.PreBuildAction(buildInfo);
            }
        }