internal bool ShouldExecute(IExecuteContext executeContext, CommandResultEntry[] previousResultCollection, ObjectId commandHash, out CommandResultEntry matchingResult) { IndexFileCommand.MountDatabase(executeContext.GetOutputObjectsGroups()); try { matchingResult = FindMatchingResult(executeContext, previousResultCollection); } finally { IndexFileCommand.UnmountDatabase(); } if (matchingResult == null || Command.ShouldForceExecution()) { // Ensure we ignore existing results if the execution is forced matchingResult = null; return(true); } return(false); }
/// <summary> /// Associate the given <see cref="ResultStatus" /> object as the result of the current step and execute the <see cref="StepProcessed"/> event. /// </summary> /// <param name="executeContext">The execute context.</param> /// <param name="status">The result status.</param> internal void RegisterResult(IExecuteContext executeContext, ResultStatus status) { Status = status; //executeContext.Logger.Debug("Step timer for {0}: callbacks: {1}ms, total: {2}ms", this, CallbackWatch.ElapsedMilliseconds, MicroThreadWatch.ElapsedMilliseconds); if (StepProcessed != null) { try { IndexFileCommand.MountDatabase(executeContext.GetOutputObjectsGroups()); StepProcessed(this, new BuildStepEventArgs(this, executeContext.Logger)); } catch (Exception ex) { executeContext.Logger.Error("Exception in command " + this + ": " + ex); } finally { IndexFileCommand.UnmountDatabase(); } } }
internal bool ShouldExecute(IExecuteContext executeContext, CommandResultEntry[] previousResultCollection, ObjectId commandHash, out CommandResultEntry matchingResult) { IndexFileCommand.MountDatabase(executeContext.GetOutputObjectsGroups()); try { matchingResult = FindMatchingResult(executeContext, previousResultCollection); } finally { IndexFileCommand.UnmountDatabase(); } if (matchingResult == null || Command.ShouldForceExecution()) { // Ensure we ignore existing results if the execution is forced matchingResult = null; return true; } return false; }
internal bool ShouldExecute(IExecuteContext executeContext, CommandResultEntry[] previousResultCollection, ObjectId commandHash, out CommandResultEntry matchingResult) { IEnumerable <IDictionary <ObjectUrl, OutputObject> > outputObjectsGroups = executeContext.GetOutputObjectsGroups(); MicrothreadLocalDatabases.MountDatabase(outputObjectsGroups); try { matchingResult = FindMatchingResult(executeContext, previousResultCollection); } finally { MicrothreadLocalDatabases.UnmountDatabase(); } if (matchingResult == null || Command.ShouldForceExecution()) { // Ensure we ignore existing results if the execution is forced matchingResult = null; return(true); } return(false); }
internal static void MountDatabases(IExecuteContext executeContext) { MountDatabases(CreateTransaction(executeContext.GetOutputObjectsGroups())); }