Improve intellisense comment for watchchar event (#83)

***NO_CI***
This commit is contained in:
Robin Jones 2022-05-12 08:54:42 +01:00 коммит произвёл GitHub
Родитель 32990886e6
Коммит 8e5078c65f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -133,7 +133,7 @@ private void DataReceivedNormalEvent(object sender, SerialDataReceivedEventArgs
#### WatchChar
.NET nanoFramework has a specific API to watch for a specific character if present at the end of the transmission.
.NET nanoFramework has a custom API event to watch for a specific character if present during the transmission.
```csharp
port.WatchChar = '\r';
@ -144,7 +144,7 @@ private void DataReceivedNormalEvent(object sender, SerialDataReceivedEventArgs
{
if (e.EventType == SerialData.WatchChar)
{
// We have our special character at the end of the transmission
// The specified character was detected when reading from the serialport.
}
}
```

Просмотреть файл

@ -8,6 +8,11 @@ namespace System.IO.Ports
/// <summary>
/// Specifies the type of character that was received on the serial port of the <see cref="SerialPort"/> object.
/// </summary>
/// <remarks>
/// This enumeration is used with the <see cref="SerialPort.DataReceived"/> event.
/// You examine the type of character that was received by retrieving the value of the <see cref="SerialDataReceivedEventArgs.EventType"/> property.
/// The EventType property contains one of the values from the `SerialData` enumeration.
/// </remarks>
public enum SerialData
{
/// <summary>
@ -16,8 +21,11 @@ namespace System.IO.Ports
Chars = 1,
/// <summary>
/// The end of file character was received and placed in the input buffer.
/// The `watch` character was received and placed in the input buffer.
/// </summary>
/// <remarks>
/// This is only supported on .Net nanoFramework.
/// </remarks>
WatchChar = 2
}
}