internal ITaskItem[] ComputeSourcesNeedingCompilationFromCompositeRootingMarker(bool searchForSubRootsInCompositeRootingMarkers) { Dictionary <string, ITaskItem> sourceDependencies = new Dictionary <string, ITaskItem>(StringComparer.OrdinalIgnoreCase); if (this.tlogAvailable) { DateTime time; DateTime time2; string str = FileTracker.FormatRootingMarker(this.sourceFiles); List <ITaskItem> list = new List <ITaskItem>(); foreach (string str2 in this.dependencyTable.Keys) { string compositeSubRoot = str2.ToUpperInvariant(); if (searchForSubRootsInCompositeRootingMarkers) { if (compositeSubRoot.Contains(str) || CanonicalTrackedFilesHelper.RootContainsAllSubRootComponents(str, compositeSubRoot)) { this.SourceDependenciesForOutputRoot(sourceDependencies, compositeSubRoot, this.outputFileGroup); } } else if (compositeSubRoot.Equals(str, StringComparison.Ordinal)) { this.SourceDependenciesForOutputRoot(sourceDependencies, compositeSubRoot, this.outputFileGroup); } } if (sourceDependencies.Count == 0) { FileTracker.LogMessageFromResources(this.Log, MessageImportance.Low, "Tracking_DependenciesForRootNotFound", new object[] { str }); return(this.sourceFiles); } list.AddRange(sourceDependencies.Values); ITaskItem[] files = list.ToArray(); string outputNewestFilename = string.Empty; string outputOldestFilename = string.Empty; if ((CanonicalTrackedFilesHelper.FilesExistAndRecordNewestWriteTime(files, this.Log, out time, out outputNewestFilename) && CanonicalTrackedFilesHelper.FilesExistAndRecordOldestWriteTime(this.outputFileGroup, this.Log, out time2, out outputOldestFilename)) && (time <= time2)) { FileTracker.LogMessageFromResources(this.Log, MessageImportance.Normal, "Tracking_AllOutputsAreUpToDate", new object[0]); return(new ITaskItem[0]); } if (sourceDependencies.Count > 100) { FileTracker.LogMessageFromResources(this.Log, MessageImportance.Low, "Tracking_InputsNotShown", new object[] { sourceDependencies.Count }); } else { FileTracker.LogMessageFromResources(this.Log, MessageImportance.Low, "Tracking_InputsFor", new object[] { str }); foreach (ITaskItem item in files) { FileTracker.LogMessage(this.Log, MessageImportance.Low, "\t" + item, new object[0]); } } FileTracker.LogMessageFromResources(this.Log, MessageImportance.Low, "Tracking_InputNewerThanOutput", new object[] { outputNewestFilename, outputOldestFilename }); } return(this.sourceFiles); }
private bool FilesExistAndRecordNewestWriteTime(ITaskItem[] files) { return(CanonicalTrackedFilesHelper.FilesExistAndRecordNewestWriteTime(files, this.Log, out this.outputNewestTime, out this.outputNewest)); }