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