81 references to Interop
System.Console (81)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (6)
123
_error =
Interop
.Sys.ConvertErrorPlatformToPal(errno);
140
get { return _rawErrno == -1 ? (_rawErrno =
Interop
.Sys.ConvertErrorPalToPlatform(_error)) : _rawErrno; }
145
return
Interop
.Sys.StrError(RawErrno);
219
public static
Interop
.ErrorInfo Info(this
Interop
.Error error)
221
return new
Interop
.ErrorInfo(error);
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
16
throw
Interop
.GetExceptionForIoErrno(errorInfo, path, isDirError);
21
if (error !=
Interop
.Error.SUCCESS)
99
Exception e =
Interop
.GetExceptionForIoErrno(Sys.GetLastErrorInfo(), path, isDirError);
179
internal static Exception GetIOException(
Interop
.ErrorInfo errorInfo, string? path = null)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (5)
36
const int BufLen =
Interop
.Sys.Passwd.InitialBufferSize;
63
Interop
.Sys.Passwd passwd;
64
int error =
Interop
.Sys.GetPwUidR(uid, out passwd, buf, bufLen);
82
var errorInfo = new
Interop
.ErrorInfo(error);
86
if (errorInfo.Error ==
Interop
.Error.ERANGE)
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (6)
66
const int BufLen =
Interop
.Sys.Passwd.InitialBufferSize;
95
Interop
.Sys.Passwd passwd;
96
int error =
Interop
.Sys.GetPwUidR(
Interop
.Sys.GetEUid(), out passwd, buf, bufLen);
115
var errorInfo = new
Interop
.ErrorInfo(error);
119
if (errorInfo.Error ==
Interop
.Error.ERANGE)
System\ConsolePal.Unix.cs (46)
48
return new UnixConsoleStream(
Interop
.CheckIo(
Interop
.Sys.Dup(
Interop
.Sys.FileDescriptors.STDIN_FILENO)), FileAccess.Read,
54
return new UnixConsoleStream(
Interop
.CheckIo(
Interop
.Sys.Dup(
Interop
.Sys.FileDescriptors.STDOUT_FILENO)), FileAccess.Write);
59
return new UnixConsoleStream(
Interop
.CheckIo(
Interop
.Sys.Dup(
Interop
.Sys.FileDescriptors.STDERR_FILENO)), FileAccess.Write);
143
return
Interop
.Sys.GetSignalForBreak() == 0;
150
if (
Interop
.Sys.SetSignalForBreak(Convert.ToInt32(!value)) == 0)
151
throw
Interop
.GetExceptionForIoErrno(
Interop
.Sys.GetLastErrorInfo());
360
Interop
.Sys.WinSize winsize;
362
Interop
.Sys.GetWindowSize(s_terminalHandle, out winsize) == 0)
472
Interop
.Sys.InitializeConsoleBeforeRead(minChars: (byte)(s_everReceivedCursorPositionResponse ? 1 : 0), decisecondsTimeout: (byte)(s_firstCursorPositionRequest ? 100 : 10));
547
Interop
.Sys.InitializeConsoleBeforeRead();
551
Interop
.Sys.UninitializeConsoleAfterRead();
665
return !
Interop
.Sys.IsATty(fd);
674
return IsHandleRedirected(
Interop
.Sys.FileDescriptors.STDIN_FILENO);
682
return IsHandleRedirected(
Interop
.Sys.FileDescriptors.STDOUT_FILENO);
690
return IsHandleRedirected(
Interop
.Sys.FileDescriptors.STDERR_FILENO);
884
if (!
Interop
.Sys.InitializeTerminalAndSignalHandling())
889
s_terminalHandle = !Console.IsOutputRedirected ?
Interop
.Sys.FileDescriptors.STDOUT_FILENO :
890
!Console.IsInputRedirected ?
Interop
.Sys.FileDescriptors.STDIN_FILENO :
899
Interop
.Sys.SetKeypadXmit(s_terminalHandle, keypadXmit);
906
Interop
.Sys.SetTerminalInvalidationHandler(&InvalidateTerminalSettings);
910
Interop
.Sys.ControlCharacterNames* controlCharacterNames = stackalloc
Interop
.Sys.ControlCharacterNames[NumControlCharacterNames]
912
Interop
.Sys.ControlCharacterNames.VERASE,
913
Interop
.Sys.ControlCharacterNames.VEOL,
914
Interop
.Sys.ControlCharacterNames.VEOL2,
915
Interop
.Sys.ControlCharacterNames.VEOF
918
Interop
.Sys.GetControlCharacters(controlCharacterNames, controlCharacterValues, NumControlCharacterNames, out s_posixDisableValue);
939
int result =
Interop
.CheckIo(
Interop
.Sys.Read(fd, bufPtr, buffer.Length));
980
int bytesWritten =
Interop
.Sys.Write(fd, bufPtr, count);
983
Interop
.ErrorInfo errorInfo =
Interop
.Sys.GetLastErrorInfo();
984
if (errorInfo.Error ==
Interop
.Error.EPIPE)
990
else if (errorInfo.Error ==
Interop
.Error.EAGAIN) // aka EWOULDBLOCK
998
Interop
.Sys.Poll(fd,
Interop
.PollEvents.POLLOUT, Timeout.Infinite, out
Interop
.PollEvents triggered);
1004
throw
Interop
.GetExceptionForIoErrno(errorInfo);
1108
=> WriteTerminalAnsiString(value,
Interop
.Sys.FileDescriptors.STDOUT_FILENO, mayChangeCursorPosition: false);
System\IO\StdInReader.cs (7)
90
int result =
Interop
.CheckIo(
Interop
.Sys.ReadStdin(buffer, bufferSize));
161
Interop
.Sys.InitializeConsoleBeforeRead();
268
Interop
.Sys.UninitializeConsoleAfterRead();
342
Interop
.Sys.InitializeConsoleBeforeRead();
372
Interop
.Sys.UninitializeConsoleAfterRead();
377
internal static bool StdinReady =>
Interop
.Sys.StdinReady();
System\TermInfo.cs (4)
366
Interop
.Sys.SNPrintF(null, 0, format, stringArg) :
367
Interop
.Sys.SNPrintF(null, 0, format, (int)arg);
382
Interop
.Sys.SNPrintF(ptr, bytes.Length, format, stringArg) :
383
Interop
.Sys.SNPrintF(ptr, bytes.Length, format, (int)arg);
System\TermInfo.DatabaseFactory.cs (3)
87
fd =
Interop
.Sys.Open(filePath,
Interop
.Sys.OpenFlags.O_RDONLY |
Interop
.Sys.OpenFlags.O_CLOEXEC, 0);