public void OutputToFile(Outputtable output) { Directory.CreateDirectory(OutputFolder ?? throw new NullReferenceException("Folder could not be created")); using (StreamWriter streamWriter = new StreamWriter(FullPath)) { streamWriter.Write(output.AsString); } ExperimentEvents.OutputSuccessfullyUpdated(FullPath); }
/// <summary> /// Outputs the Outputtable as a file /// </summary> /// <param name="output"></param> void OutputFile(Outputtable output) { Debug.Log($"Writing to file {outputPath}"); string folder = Path.GetDirectoryName(outputPath); if (folder != null) { Directory.CreateDirectory(folder); } using (StreamWriter streamWriter = new StreamWriter(outputPath)) { streamWriter.Write(output.AsString); } }
public static void OutputUpdated(Outputtable output) { OnOutputUpdated?.Invoke(output); }
public static void UpdateOutput(Outputtable output) { OnTimeToUpdateOutput?.Invoke(output); }
void OutputToFile(Outputtable output) { file.OutputToFile(output); }