private ObjectInfo FileArtifactInfo(FileArtifact f) { if (!f.IsValid) { return(new ObjectInfo("Invalid")); } return(new ObjectInfoBuilder() .Preview(FileArtifactPreview(f)) .Prop("Path", f.Path.ToString(PathTable)) .Prop("Kind", f.IsSourceFile ? "source" : "output") .Prop("RewriteCount", f.RewriteCount) .Prop("FileContentInfo", () => Analyzer.TryGetFileContentInfo(f)) .Prop("Producer", () => f.IsOutputFile ? Analyzer.GetPip(PipGraph.GetProducer(f)) : null) .Prop("Consumers", () => PipGraph.GetConsumingPips(f.Path)) .Build()); }
private ObjectInfo FileArtifactInfo(FileArtifact f) { if (!f.IsValid) { return(new ObjectInfo("Invalid")); } return(new ObjectInfo( preview: FileArtifactPreview(f), properties: new[] { new Property("Path", f.Path.ToString(PathTable)), new Property("Kind", f.IsSourceFile ? "source" : "output"), new Property("RewriteCount", f.RewriteCount), new Property("FileContentInfo", () => Analyzer.TryGetFileContentInfo(f)), f.IsOutputFile ? new Property("Producer", () => Analyzer.GetPip(PipGraph.GetProducer(f))) : null, new Property("Consumers", () => PipGraph.GetConsumingPips(f.Path)) } .Where(p => p != null))); }