private static Stream GetFileExample() { var stream = new MemoryStream(); using (var writer = new StreamWriter(stream, Encoding.UTF8, 1024, leaveOpen: true)) { writer.Write("This is an example text file"); writer.Flush(); stream.Position = 0L; } var file = new ExampleStream(stream); return(file); }
private static Stream GetFileExample() { var stream = new MemoryStream(); using (var writer = new StreamWriter(stream, Encoding.UTF8, 1024, true)) { writer.Write(IntegrationImportProjectContentExample); writer.Flush(); stream.Position = 0L; } var file = new ExampleStream(stream); return(file); }