Skip to content

CA1826 (Do not use Enumerable methods on indexable collections)#27

Closed
kirsan31 wants to merge 1 commit into
Alparse:masterfrom
kirsan31:PR3
Closed

CA1826 (Do not use Enumerable methods on indexable collections)#27
kirsan31 wants to merge 1 commit into
Alparse:masterfrom
kirsan31:PR3

Conversation

@kirsan31
Copy link
Copy Markdown

@kirsan31 kirsan31 commented May 18, 2026

CA1826 (Do not use Enumerable methods on indexable collections. Instead use the collection directly) fix.
SymbolMapping.Intervals is IReadOnlyList. So in performance reason we need to use index directly instead of FirstOrDefault.

Alparse added a commit that referenced this pull request May 27, 2026
…ode quality fixes (Issues #24, #29, #30, PRs #25-28, #31)

- Pin databento-cpp to v0.58.0 to prevent broken intermediate builds (#24)
- Deprecate caching API with [Obsolete] attributes, guide to WithFileSource() (#29)
- PlaybackController implements IDisposable for SemaphoreSlim cleanup (#29)
- StreamAsync XML docs for live vs backtest mode behavior (#30)
- Fix S&P XML escaping and BatchSubmitJobAsync cref (PR #25)
- Remove CA1805 default initializations across 10 files (PR #26)
- Replace FirstOrDefault() with indexer in FileDataSource (PR #27)
- Fix FormUrlEncodedContent disposal in retry loops, add ConfigureAwait(false) (PR #28)
- Remove dead _apiKey field from LiveClient and ReferenceClient (PR #31)
@Alparse
Copy link
Copy Markdown
Owner

Alparse commented May 27, 2026

Thanks @kirsan31 — applied in v5.3.2. Direct indexer after the count check is the right call.

@Alparse Alparse closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants