Skip to content

Commit

Permalink
Add backing fields for PinValuePair properties (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes authored Sep 21, 2022
1 parent 63a8bfd commit 512c38a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions System.Device.Gpio/PinValuePair.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ namespace System.Device.Gpio
/// </summary>
public readonly struct PinValuePair
{
private readonly int _pinNumber;
private readonly PinValue _pinValue;

/// <summary>
/// The pin number.
/// </summary>
public int PinNumber { get; }

public int PinNumber => _pinNumber;
/// <summary>
/// The pin value.
/// </summary>
public PinValue PinValue { get; }
public PinValue PinValue => _pinValue;

/// <summary>
/// Initializes a new instance of the <see cref="PinValuePair"/> struct.
Expand All @@ -26,8 +28,8 @@ public readonly struct PinValuePair
/// <param name="pinValue">The pin value.</param>
public PinValuePair(int pinNumber, PinValue pinValue)
{
PinNumber = pinNumber;
PinValue = pinValue;
_pinNumber = pinNumber;
_pinValue = pinValue;
}

/// <summary>
Expand Down

0 comments on commit 512c38a

Please sign in to comment.