Skip to content

Commit 2199e06

Browse files
authored
Move Controller property to base class (#2)
1 parent ce968bd commit 2199e06

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

System.Device.Adc/AdcChannel.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ public class AdcChannel : AdcChannelBase, IDisposable
2020
[Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)]
2121
private readonly int _channelNumber;
2222

23-
[Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)]
24-
private AdcController _adcController;
25-
2623
[Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)]
2724
private bool _disposed;
2825

@@ -34,15 +31,6 @@ internal AdcChannel(AdcController controller, int channelNumber)
3431
_syncLock = new object();
3532
}
3633

37-
/// <inheritdoc/>
38-
public AdcController Controller
39-
{
40-
get
41-
{
42-
return _adcController;
43-
}
44-
}
45-
4634
/// <inheritdoc/>
4735
public override int ReadValue()
4836
{

System.Device.Adc/AdcChannelBase.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ namespace System.Device.Adc
1010
/// </summary>
1111
public abstract class AdcChannelBase
1212
{
13+
[Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)]
14+
internal AdcController _adcController;
15+
1316
/// <summary>
1417
/// Reads the digital representation of the analog value from the ADC.
1518
/// </summary>
@@ -35,6 +38,6 @@ public double ReadRatio()
3538
/// <value>
3639
/// The <see cref="AdcController"/>.
3740
/// </value>
38-
public AdcController Controller { get; }
41+
public AdcController Controller => _adcController;
3942
}
4043
}

0 commit comments

Comments
 (0)