From 4be7554144510fead05f34b3365b5a227d063e7e Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sat, 9 Jan 2021 22:42:09 -0500 Subject: [PATCH] add AutoFlush property, and not sure why WriteCharArray() was commented out there --- Libraries/UniversalEditor.Core/IO/Writer.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/UniversalEditor.Core/IO/Writer.cs b/Libraries/UniversalEditor.Core/IO/Writer.cs index a912f886..61fa3a0d 100644 --- a/Libraries/UniversalEditor.Core/IO/Writer.cs +++ b/Libraries/UniversalEditor.Core/IO/Writer.cs @@ -60,8 +60,13 @@ namespace UniversalEditor.IO data = Transformations[i].Transform(data); } Write(data, 0, data.Length); + + if (AutoFlush) + Flush(); } + public bool AutoFlush { get; set; } = false; + [CLSCompliant(false)] public void WriteSBytes(sbyte[] data) { @@ -637,7 +642,7 @@ namespace UniversalEditor.IO } else if (objectType == typeof(Char[])) { - // WriteCharArray((char[])value); + WriteCharArray((char[])value); return; } else if (objectType == typeof(Single))