95 references to SR
System.IO.Ports (95)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (18)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound); 133new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, path)) : 134new DirectoryNotFoundException(SR.IO_PathNotFound_NoPathName); 141new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, path), inner) : 142new UnauthorizedAccessException(SR.UnauthorizedAccess_IODenied_NoPathName, inner); 146new PathTooLongException(SR.Format(SR.IO_PathTooLong_Path, path)) : 147new PathTooLongException(SR.IO_PathTooLong); 151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 158return new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_FileLengthTooBig); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno);
System\IO\Ports\InternalResources.cs (5)
14throw new EndOfStreamException(SR.IO_EOF_ReadBeyondEOF); 24return new ObjectDisposedException(null, SR.Port_not_open); 34throw new ArgumentException(SR.Arg_WrongAsyncResult); 40throw new ArgumentException(SR.InvalidOperation_EndReadCalledMultiple); 46throw new ArgumentException(SR.InvalidOperation_EndWriteCalledMultiple);
System\IO\Ports\SafeSerialDeviceHandle.Unix.cs (2)
30SR.Format(SR.UnauthorizedAccess_IODenied_Port, portName),
System\IO\Ports\SerialPort.cs (54)
146throw new InvalidOperationException(SR.BaseStream_Invalid_Not_Open); 158throw new ArgumentOutOfRangeException(nameof(BaudRate), SR.ArgumentOutOfRange_NeedPosNum); 171throw new InvalidOperationException(SR.Port_not_open); 178throw new InvalidOperationException(SR.Port_not_open); 190throw new InvalidOperationException(SR.Port_not_open); 201throw new InvalidOperationException(SR.Port_not_open); 219throw new InvalidOperationException(SR.Port_not_open); 229throw new InvalidOperationException(SR.Port_not_open); 241throw new ArgumentOutOfRangeException(nameof(DataBits), SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, MinDataBits, MaxDataBits)); 268throw new InvalidOperationException(SR.Port_not_open); 309throw new ArgumentException(SR.Format(SR.NotSupportedEncoding, value.WebName), nameof(Encoding)); 330throw new ArgumentOutOfRangeException(nameof(Handshake), SR.ArgumentOutOfRange_Enum); 352throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(NewLine)), nameof(NewLine)); 367throw new ArgumentOutOfRangeException(nameof(Parity), SR.ArgumentOutOfRange_Enum); 399throw new ArgumentException(SR.PortNameEmpty_String, nameof(PortName)); 402throw new InvalidOperationException(SR.Format(SR.Cant_be_set_when_open, nameof(PortName))); 419throw new InvalidOperationException(SR.Format(SR.Cant_be_set_when_open, nameof(ReadBufferSize))); 435throw new ArgumentOutOfRangeException(nameof(ReadTimeout), SR.ArgumentOutOfRange_Timeout); 455throw new ArgumentOutOfRangeException(nameof(ReceivedBytesThreshold), SR.ArgumentOutOfRange_NeedPosNum); 497throw new ArgumentOutOfRangeException(nameof(StopBits), SR.ArgumentOutOfRange_Enum); 517throw new InvalidOperationException(SR.Format(SR.Cant_be_set_when_open, nameof(WriteBufferSize))); 533throw new ArgumentOutOfRangeException(nameof(WriteTimeout), SR.ArgumentOutOfRange_WriteTimeout); 610throw new InvalidOperationException(SR.Port_not_open); 618throw new InvalidOperationException(SR.Port_not_open); 629throw new InvalidOperationException(SR.Port_already_open); 661throw new InvalidOperationException(SR.Port_not_open); 665throw new ArgumentOutOfRangeException(nameof(offset), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 667throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 669throw new ArgumentException(SR.Argument_InvalidOffLen); 707throw new InvalidOperationException(SR.Port_not_open); 802throw new InvalidOperationException(SR.Port_not_open); 806throw new ArgumentOutOfRangeException(nameof(offset), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 808throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 810throw new ArgumentException(SR.Argument_InvalidOffLen); 982throw new InvalidOperationException(SR.Port_not_open); 993throw new InvalidOperationException(SR.Port_not_open); 1059throw new InvalidOperationException(SR.Port_not_open); 1063throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(value)), nameof(value)); 1177throw new InvalidOperationException(SR.Port_not_open); 1193throw new InvalidOperationException(SR.Port_not_open); 1197throw new ArgumentOutOfRangeException(nameof(offset), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 1199throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 1201throw new ArgumentException(SR.Argument_InvalidOffLen); 1213throw new InvalidOperationException(SR.Port_not_open); 1217throw new ArgumentOutOfRangeException(nameof(offset), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 1219throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 1221throw new ArgumentException(SR.Argument_InvalidOffLen);
System\IO\Ports\SerialPort.Unix.cs (1)
29: throw new PlatformNotSupportedException(SR.PlatformNotSupported_SerialPort_GetPortNames);
System\IO\Ports\SerialStream.cs (10)
57get { throw new NotSupportedException(SR.NotSupported_UnseekableStream); } 62get { throw new NotSupportedException(SR.NotSupported_UnseekableStream); } 63set { throw new NotSupportedException(SR.NotSupported_UnseekableStream); } 68throw new NotSupportedException(SR.NotSupported_UnseekableStream); 73throw new NotSupportedException(SR.NotSupported_UnseekableStream); 96throw new ArgumentOutOfRangeException(nameof(offset), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 98throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNumRequired); 100throw new ArgumentException(SR.Argument_InvalidOffLen); 119throw new InvalidOperationException(SR.In_Break_State); 127throw new InvalidOperationException(SR.In_Break_State);
System\IO\Ports\SerialStream.Unix.cs (5)
99throw new ArgumentOutOfRangeException(nameof(ReadTimeout), SR.ArgumentOutOfRange_Timeout); 113throw new ArgumentOutOfRangeException(nameof(ReadTimeout), SR.ArgumentOutOfRange_Timeout); 125throw new ArgumentOutOfRangeException(nameof(BaudRate), SR.ArgumentOutOfRange_NeedPosNum); 256throw new InvalidOperationException(SR.CantSetRtsWithHandshaking); 264throw new InvalidOperationException(SR.CantSetRtsWithHandshaking);