internal static void TtySetMode(IntPtr handle, TtyMode ttyMode) { Debug.Assert(handle != IntPtr.Zero); int result = uv_tty_set_mode(handle, (uv_tty_mode_t)ttyMode); ThrowIfError(result); }
internal static void TtySetMode(IntPtr handle, TtyMode ttyMode) { Contract.Requires(handle != IntPtr.Zero); int result = uv_tty_set_mode(handle, (uv_tty_mode_t)ttyMode); if (result < 0) { throw CreateError((uv_err_code)result); } }
public Tty Mode(TtyMode mode) { if (mode == TtyMode.IO && !Platform.IsUnix) { ThrowHelper.ThrowArgumentException_TtyMode_is_Unix_only(mode); } Validate(); NativeMethods.TtySetMode(InternalHandle, mode); return(this); }
public Tty Mode(TtyMode mode) { if (mode == TtyMode.IO && !Platform.IsUnix) { throw new ArgumentException($"{mode} is Unix only.", nameof(mode)); } this.Validate(); NativeMethods.TtySetMode(this.InternalHandle, mode); return(this); }