コード例 #1
0
		async Task<BuildResult> RebuildAsync (IBuildTarget entry, ProgressMonitor monitor, OperationContext operationContext)
		{
			ITimeTracker tt = Counters.BuildItemTimer.BeginTiming ("Rebuilding " + entry.Name);
			try {
				OnStartClean (monitor, tt);

				monitor.BeginTask (GettextCatalog.GetString ("Rebuilding..."), 2);
				monitor.BeginStep (GettextCatalog.GetString ("Rebuilding... (Clean)"));

				var res = await CleanAsync (entry, monitor, tt, true, operationContext);
				monitor.EndStep ();
				if (res.HasErrors) {
					tt.End ();
					monitor.Dispose ();
					return res;
				}
				if (StartBuild != null) {
					BeginBuild (monitor, tt, true);
				}
				monitor.BeginStep (GettextCatalog.GetString ("Rebuilding... (Build)"));
				return await BuildSolutionItemAsync (entry, monitor, tt, operationContext:operationContext);
			} finally {
				tt.End ();
			}
		}