Skip to content

Commit 3a608e1

Browse files
authored
Remove unnecessary dispose checks (#54)
***NO_CI***
1 parent 9972132 commit 3a608e1

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

System.Device.Gpio/GpioPin.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ public void SetPinMode(PinMode value)
135135
{
136136
lock (_syncLock)
137137
{
138-
// check if pin has been disposed
139-
if (_disposedValue) { throw new ObjectDisposedException(); }
140-
141138
// the native call takes care of:
142139
// 1) validating if the requested pin mode is supported
143140
// 2) throwing ArgumentException otherwise
@@ -166,9 +163,6 @@ public void Write(PinValue value)
166163
{
167164
lock (_syncLock)
168165
{
169-
// check if pin has been disposed
170-
if (_disposedValue) { throw new ObjectDisposedException(); }
171-
172166
// the native call takes care of:
173167
// 1) validating if the requested pin mode is supported
174168
// 2) throwing ArgumentException otherwise

0 commit comments

Comments
 (0)