public static void Serialize(string fullFileName, object source) { using var streamWriter = StreamFactory.CreateStreamWriter(fullFileName); using var jsonWriter = JsonFactory.CreateJsonWriter(streamWriter); var jsonSerializer = JsonFactory.CreateJsonSerializer(); jsonSerializer.Serialize(jsonWriter, source); }
public void GenerateOutputFile() { SetFullOutputFileName(); using var streamWriter = StreamFactory.CreateStreamWriter(FullOutputFileName); WriteDates(streamWriter); WriteColumnHeadings(streamWriter); WriteRows(streamWriter); }