public static StringIO /*!*/ Reopen(StringIO /*!*/ self, [DefaultProtocol, NotNull] MutableString /*!*/ content, int mode) { IOMode ioMode = (IOMode)mode | IOMode.PreserveEndOfLines; self.SetContent(CheckContent(content, ioMode)); self._mode = ioMode; return(self); }
public static StringIO /*!*/ Reopen(StringIO /*!*/ self, [DefaultProtocol, NotNull] MutableString /*!*/ content, [DefaultProtocol, NotNull] MutableString mode) { IOMode ioMode = IOModeEnum.Parse(mode, content.IsFrozen ? IOMode.ReadOnly : IOMode.ReadWrite) | IOMode.PreserveEndOfLines; self.SetContent(CheckContent(content, ioMode)); self._mode = ioMode; return(self); }
public static StringIO /*!*/ Reopen(RubyContext /*!*/ context, [NotNull] StringIO /*!*/ self, [NotNull] StringIO /*!*/ other) { self.SetContent(other._content); self._mode = other._mode; self._lineNumber = other._lineNumber; self._position = other._position; // TODO: this seems to be MRI bug // Shouldn't StringIO's taint be always same as the underlying string's taint? context.TaintObjectBy(self, other); return(self); }
public static MutableString /*!*/ SetString(StringIO /*!*/ self, [DefaultProtocol, NotNull] MutableString /*!*/ str) { self.SetContent(str); return(str); }
public static StringIO /*!*/ Reopen(StringIO /*!*/ self) { self.SetContent(MutableString.CreateBinary()); self._mode = IOMode.ReadWrite; return(self); }
public static MutableString/*!*/ SetString(StringIO/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ str) { self.SetContent(str); return str; }
public static StringIO/*!*/ Reopen(StringIO/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ content, int mode) { IOMode ioMode = (IOMode)mode | IOMode.PreserveEndOfLines; self.SetContent(CheckContent(content, ioMode)); self._mode = ioMode; return self; }
public static StringIO/*!*/ Reopen(StringIO/*!*/ self, [DefaultProtocol, NotNull]MutableString/*!*/ content, [DefaultProtocol, NotNull]MutableString mode) { IOMode ioMode = IOModeEnum.Parse(mode, content.IsFrozen ? IOMode.ReadOnly : IOMode.ReadWrite) | IOMode.PreserveEndOfLines; self.SetContent(CheckContent(content, ioMode)); self._mode = ioMode; return self; }
public static StringIO/*!*/ Reopen(StringIO/*!*/ self) { self.SetContent(MutableString.CreateBinary()); self._mode = IOMode.ReadWrite; return self; }