Summary of problem:
When I initialize the Ft232h as a SPI device and then dispose of it, an InvalidOperationException error is thrown because we are disposing of the same elements from the list that we are iterating over.
Resolution:
Make a copy of the "_managers" list by using "ToList" so that the iteration continues as we dispose from the target list
Summary of problem: When I initialize the Ft232h as a SPI device and then dispose of it, an InvalidOperationException error is thrown because we are disposing of the same elements from the list that we are iterating over.
Resolution: Make a copy of the "_managers" list by using "ToList" so that the iteration continues as we dispose from the target list
Example:
Path: /Users/joshbender/DocumentsLocal/Github/iot/src/devices/Ft232H/samples/Program.cs
Path: /Users/joshbender/DocumentsLocal/Github/iot/src/devices/Board/Board.cs
Microsoft Reviewers: Open in CodeFlow