dotnet / dotnet/iot

Do not throw ObjectDisposedException in ExtendedCommandHandler.Dispose()

Open
#1,839 5 comments 0 reactions 1 assignee Claimed by @pgrawehr View on GitHub
api-suggestion Priority:3
Dominant language
C#
Stars
2.4k
Forks
630
Avg merge
11d 3h
Merged PRs (30d)
2

Description

# The problem

https://github.com/dotnet/iot/blob/80d67e0176fb49820adab393711cc5db1ecdd0c2/src/devices/Arduino/ArduinoBoard.cs#L701

# Solution

Remove `if(_isDisposed) throw new ObjectDisposedException();` somewhere.

# Alternatives

* `public bool IsDisposed { get; private set; }`

###### maybe it doesn't throw anything at all and try/catch is reduant here
###### ~~remove `api-suggestion` label~~

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.