/// <summary> /// Adds a verb to the mapping of build objects to the verb which /// creates them. /// </summary> /// <remarks> /// TODO: Make this private. /// </remarks> /// <param name="verb">The verb to add.</param> internal void addVerb(IVerb verb) { if (!this.knownVerbs.Add(verb)) { // We've already added this verb. return; } // Add all verb outputs to the output-to-verb map. foreach (BuildObject obj in verb.getOutputs()) { if (this.outputToVerbMap.ContainsKey(obj)) { Util.Assert(this.outputToVerbMap[obj].Equals(verb)); } else { this.outputToVerbMap[obj] = verb; } } // Recursively add all the verbs this verb is dependent upon, // so that we have a complete index of outputs back to the // verbs that generate them. foreach (IVerb dependentVerb in verb.getVerbs()) { this.addVerb(dependentVerb); } }
/// <summary> /// Reexamines a verb to see if it now knows more regarding what other /// verbs need to run first in order to create its dependencies. /// </summary> /// <param name="verb">The verb to reexamine.</param> private void reexamineVerb(IVerb verb) { foreach (IVerb parentVerb in verb.getVerbs()) { this.addVerb(parentVerb); } }
private void reexamineVerb(IVerb verb) { //- Perhaps this child knows more since we last tried //- to work upstream from it. foreach (IVerb parentVerb in verb.getVerbs()) { hasher.addVerb(parentVerb); } }