Deltares / Deltares/ProbabilisticLibrary

CallbackList calling too many updates callbacks when using AddRange

Open
#360 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
8
Forks
1
Avg merge
4d 18h
Merged PRs (30d)
4

Description

Kind of request

Changing existing functionality

Enhancement description

The .net class CallbackList sends for each added item the whole list when AddRange is used. So calling AddRange for {1,2,3}, it sends {1}, {1, 2} and {1,2,3}.

Instead, it should only send {1,2,3}. This can be achieved by implementing the AddRange method in CallbackList and an extension method for IList so that it will be invoked when the CallbackList is exposed as an IList

Use case

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CallbackList class and its AddRange and IList entry points. Trace how callbacks are emitted for individual additions, then verify that adding {1,2,3} produces one callback containing the complete list, including through the IList extension path.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.