public void Flush() { var stream = GetStream(); try { stream.Flush(); } catch (ObjectDisposedException) { throw RubyExceptions.CreateEBADF(); } }
public static int Write(RubyIO /*!*/ self, [NotNull] MutableString /*!*/ val) { int bytesWritten = val.IsEmpty ? 0 : self.WriteBytes(val, 0, val.GetByteCount()); if (self.AutoFlush) { self.Flush(); } return(bytesWritten); }