public static int WriteNoBlock(RubyIO /*!*/ self, [NotNull] MutableString /*!*/ val) { var stream = self.GetWritableStream(); try { stream.WriteTimeout = 0; } catch (InvalidOperationException) { throw RubyExceptions.CreateEBADF(); } return(Write(self, val)); }
public static int SysWrite(BinaryOpStorage /*!*/ writeStorage, ConversionStorage <MutableString> /*!*/ tosConversion, RubyContext /*!*/ context, RubyIO /*!*/ self, [NotNull] MutableString /*!*/ val) { RubyBufferedStream stream = self.GetWritableStream(); if (stream.DataBuffered) { PrintOps.ReportWarning(writeStorage, tosConversion, MutableString.CreateAscii("syswrite for buffered IO")); } int bytes = Write(self, val); self.Flush(); return(bytes); }
public static int WriteNoBlock(RubyIO/*!*/ self, [NotNull]MutableString/*!*/ val) { var stream = self.GetWritableStream(); int result = -1; self.NonBlockingOperation(() => result = Write(self, val), false); return result; }
public static int SysWrite(BinaryOpStorage/*!*/ writeStorage, ConversionStorage<MutableString>/*!*/ tosConversion, RubyContext/*!*/ context, RubyIO/*!*/ self, [NotNull]MutableString/*!*/ val) { RubyBufferedStream stream = self.GetWritableStream(); if (stream.DataBuffered) { PrintOps.ReportWarning(writeStorage, tosConversion, MutableString.CreateAscii("syswrite for buffered IO")); } int bytes = Write(self, val); self.Flush(); return bytes; }
public static int WriteNoBlock(RubyIO/*!*/ self, [NotNull]MutableString/*!*/ val) { var stream = self.GetWritableStream(); try { stream.WriteTimeout = 0; } catch (InvalidOperationException) { throw RubyExceptions.CreateEBADF(); } return Write(self, val); }