Ejemplo n.º 1
0
        bool TempInputsHaveChanged(TempEntry entry, ChangeDetection detection)
        {
            for (int i = 0; i < entry.Inputs.Count; i++)
            {
                if (CheckChanged(detection, new FileInfo(entry.InputPaths[i]), entry.Inputs[i]))
                    return true;
            }

            return entry.TempDependencies.Any(t => TempInputsHaveChanged(t, detection));
        }
Ejemplo n.º 2
0
        TempEntry CreateTempEntry(BuildInstance instance)
        {
            var entry = new TempEntry();
            bool hashInputs = (instance.Env.InputChangeDetection & ChangeDetection.Hash) != 0;
            foreach (var input in instance.Inputs)
            {
                entry.Inputs.Add(CreateFileEntry(input, hashInputs));
                entry.InputPaths.Add(input);
            }

            // create entries for each dependent temp build
            foreach (var build in instance.TempBuilds)
                entry.TempDependencies.Add(CreateTempEntry(build));

            return entry;
        }