System.IO.Ports
Provides support for efficiently using Tasks to implement the APM (Begin/End) pattern.
Marshals the Task as an IAsyncResult, using the supplied callback and state
to implement the APM pattern.
The Task to be marshaled.
The callback to be invoked upon completion.
The state to be stored in the IAsyncResult.
An IAsyncResult to represent the task's asynchronous operation.
Processes an IAsyncResult returned by Begin.
The IAsyncResult to unwrap.
Processes an IAsyncResult returned by Begin.
The IAsyncResult to unwrap.
Gets the task represented by the IAsyncResult.
Throws an argument exception for the invalid .
Provides a simple IAsyncResult that wraps a Task.
We could use the Task as the IAsyncResult if the Task's AsyncState is the same as the object state,
but that's very rare, in particular in a situation where someone cares about allocation, and always
using TaskAsyncResult simplifies things and enables additional optimizations.
The wrapped Task.
Callback to invoke when the wrapped task completes.
Initializes the IAsyncResult with the Task to wrap and the associated object state.
The Task to wrap.
The new AsyncState value.
Callback to invoke when the wrapped task completes.
Invokes the callback.
Gets a user-defined object that qualifies or contains information about an asynchronous operation.
Gets a value that indicates whether the asynchronous operation completed synchronously.
This is set lazily based on whether the has completed by the time this object is created.
Gets a value that indicates whether the asynchronous operation has completed.
Gets a that is used to wait for an asynchronous operation to complete.
Unable to read beyond the end of the stream.
The BaseStream is only available when the port is open.
The PortName cannot be empty.
The port is closed.
The port is already open.
'{0}' cannot be set while the port is open.
The maximum baud rate for the device is {0}.
The port is in the break state and cannot be written to.
The write timed out.
RtsEnable cannot be accessed if Handshake is set to RequestToSend or RequestToSendXOnXOff.
SerialPort does not support encoding '{0}'. The supported encodings include ASCIIEncoding, UTF8Encoding, UnicodeEncoding, UTF32Encoding, and most single or double byte code pages. For a complete list please see the documentation.
The given port name ({0}) does not resolve to a valid serial port.
The given port name is invalid. It may be a valid port, but not a serial port.
Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
Argument must be between {0} and {1}.
Enum value was out of legal range.
Non-negative number required.
Positive number required.
The timeout must be greater than or equal to -1.
The timeout must be either a positive number or -1.
Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's ...
The I/O operation has been aborted because of either a thread exit or an application request.
Stream does not support seeking.
Cannot access a closed stream.
Argument {0} cannot be null or zero-length.
IAsyncResult object did not come from the corresponding async method on this type.
EndRead can only be called once for each asynchronous operation.
EndWrite can only be called once for each asynchronous operation.
Access to the port '{0}' is denied.
System.IO.Ports is currently only supported on Windows.
Enumeration of serial port names is not supported on the current platform.
The specified file name or path is too long, or a component of the specified path is too long.
Could not find a part of the path.
Could not find a part of the path '{0}'.
Unable to find the specified file.
Could not find file '{0}'.
Access to the path is denied.
Access to the path '{0}' is denied.
The path '{0}' is too long, or a component of the specified path is too long.
The process cannot access the file '{0}' because it is being used by another process.
The process cannot access the file because it is being used by another process.
Specified file length was too large for the file system.
The file '{0}' already exists.
Cannot create '{0}' because a file or directory with the same name already exists.
Reads a number of bytes from an open file descriptor into a specified buffer.
The open file descriptor to try to read from
The buffer to read info into
The size of the buffer
Returns the number of bytes read on success; otherwise, -1 is returned
Note - on fail. the position of the stream may change depending on the platform; consult man 2 read for more info
Writes the specified buffer to the provided open file descriptor
The file descriptor to try and write to
The data to attempt to write
The amount of data to write, in bytes
Returns the number of bytes written on success; otherwise, returns -1 and sets errno
Polls a set of file descriptors for signals and returns what signals have been set
A list of PollEvent entries
The number of entries in pollEvents
The amount of time to wait; -1 for infinite, 0 for immediate return, and a positive number is the number of milliseconds
The number of events triggered (i.e. the number of entries in pollEvents with a non-zero TriggeredEvents). May be zero in the event of a timeout.
An error or Error.SUCCESS.
Polls a File Descriptor for the passed in flags.
The descriptor to poll
The events to poll for
The amount of time to wait; -1 for infinite, 0 for immediate return, and a positive number is the number of milliseconds
The events that were returned by the poll call. May be PollEvents.POLLNONE in the case of a timeout.
An error or Error.SUCCESS.
Common Unix errno error codes.
Validates the result of system call that returns greater than or equal to 0 on success
and less than 0 on failure, with errno set to the error code.
If the system call failed for any reason, an exception is thrown. Otherwise, the system call succeeded.
The result of the system call.
The path with which this error is associated. This may be null.
true if error is caused by a directory issue.
On success, returns the non-negative result long that was validated.
Throws an IOException using the last error info (errno).
Validates the result of system call that returns greater than or equal to 0 on success
and less than 0 on failure, with errno set to the error code.
If the system call failed for any reason, an exception is thrown. Otherwise, the system call succeeded.
On success, returns the non-negative result int that was validated.
Validates the result of system call that returns greater than or equal to 0 on success
and less than 0 on failure, with errno set to the error code.
If the system call failed for any reason, an exception is thrown. Otherwise, the system call succeeded.
On success, returns the non-negative result IntPtr that was validated.
Validates the result of system call that returns greater than or equal to 0 on success
and less than 0 on failure, with errno set to the error code.
If the system call failed for any reason, an exception is thrown. Otherwise, the system call succeeded.
On success, returns the valid SafeFileHandle that was validated.
Gets an Exception to represent the supplied error info.
The error info
The path with which this error is associated. This may be null.
true if error is caused by a directory issue.