public void Store(BuildResult result) { CreateCacheFolder(); WriteReferences(result); WriteVariables(result); WriteAssembly(result); WriteSymbols(result); }
void WriteVariables(BuildResult result) { var variables = result.Variables .OrderBy(x => x.Name) .ToArray(); var names = string.Join("!#!", variables.Select(x => x.Name)); var values = StringHash(string.Join("", variables.Select(x => x.Value))); File.WriteAllLines(CapturedVariablesFile, new[]{names, values}); }
void WriteReferences(BuildResult result) { File.WriteAllLines(ReferencesFile, result.References.Select(x => x.FullPath)); }
void WriteSymbols(BuildResult result) { if (result.SymbolBytes != null) File.WriteAllBytes(PdbFile, result.SymbolBytes); }
void WriteAssembly(BuildResult result) { File.WriteAllBytes(AssemblyFile, result.AssemblyBytes); }