Skip to content

Commit cd899f7

Browse files
authored
Code refactoring (#14)
1 parent 8045593 commit cd899f7

File tree

12 files changed

+128
-83
lines changed

12 files changed

+128
-83
lines changed

System.IO.Ports/Handshake.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
namespace System.IO.Ports
1+
//
2+
// Copyright (c) .NET Foundation and Contributors
3+
// See LICENSE file in the project root for full license information.
4+
//
5+
6+
namespace System.IO.Ports
27
{
38
/// <summary>
49
/// Specifies the control protocol used in establishing a serial port communication
5-
/// for a System.IO.Ports.SerialPort object.
10+
/// for a <see cref="SerialPort"/> object.
611
/// </summary>
712
public enum Handshake
813
{

System.IO.Ports/Parity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace System.IO.Ports
77
{
88
/// <summary>
9-
/// Specifies the parity bit for a System.IO.Ports.SerialPort object.
9+
/// Specifies the parity bit for a <see cref="SerialPort"/> object.
1010
/// </summary>
1111
public enum Parity
1212
{

System.IO.Ports/SerialData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace System.IO.Ports
77
{
88
/// <summary>
9-
/// Specifies the type of character that was received on the serial port of the System.IO.Ports.SerialPort object.
9+
/// Specifies the type of character that was received on the serial port of the <see cref="SerialPort"/> object.
1010
/// </summary>
1111
public enum SerialData
1212
{

System.IO.Ports/SerialDataReceivedEventArgs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
//
55

66
namespace System.IO.Ports
7-
{
7+
{
88
/// <summary>
9-
/// Provides data for the System.IO.Ports.SerialPort.DataReceived event.
9+
/// Provides data for the <see cref="SerialPort.DataReceived"/> event.
1010
/// </summary>
1111
public class SerialDataReceivedEventArgs : EventArgs
1212
{

System.IO.Ports/SerialDataReceivedEventHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ namespace System.IO.Ports
77
{
88
/// <summary>
99
/// Represents the method that will handle the System.IO.Ports.SerialPort.DataReceived
10-
/// event of a System.IO.Ports.SerialPort object.
10+
/// event of a <see cref="SerialPort"/> object.
1111
/// </summary>
12-
/// <param name="sender">The sender of the event, which is the System.IO.Ports.SerialPort object.</param>
13-
/// <param name="e">A System.IO.Ports.SerialDataReceivedEventArgs object that contains the event data.</param>
12+
/// <param name="sender">The sender of the event, which is the <see cref="SerialPort"/> object.</param>
13+
/// <param name="e">A <see cref="SerialDataReceivedEventArgs"/> object that contains the event data.</param>
1414
public delegate void SerialDataReceivedEventHandler(object sender, SerialDataReceivedEventArgs e);
1515
}

System.IO.Ports/SerialDeviceEventListener.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace System.IO.Ports
1111
internal class SerialDeviceEventListener : IEventProcessor, IEventListener
1212
{
1313
// Map of serial device numbers to SerialDevice objects.
14-
private readonly ArrayList _serialDevicesMap = new ArrayList();
14+
private readonly ArrayList _serialDevicesMap = new();
1515

1616
public SerialDeviceEventListener()
1717
{

System.IO.Ports/SerialMode.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ namespace System.IO.Ports
1010
/// </summary>
1111
public enum SerialMode
1212
{
13-
/// <summary>
14-
/// Normal Serial mode with handshake define by SerialHandshake.
15-
/// </summary>
16-
Normal,
13+
/// <summary>
14+
/// Normal Serial mode with handshake define by SerialHandshake.
15+
/// </summary>
16+
Normal,
17+
1718
/// <summary>
1819
/// Used for Half duplex RS485 mode.
1920
/// Puts the port in to half duplex RS485 mode where the RTS is raised while the port is sending data. Once data is completely sent the RTS signal is lowered.

0 commit comments

Comments
 (0)