[Feature]: Bi-directional support for `BindingList<T>` adaptor

Aperta
#853 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
api

Direzione di ricerca

Start by reading the Bind operator and the existing BindingList<T> adaptor; the issue does not name files or tests. First clarify which proposed flowback API to use and how it should prevent recursive events. Done means additions and removals through the bound list flow back to the source while source updates still reach the list.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Needs Consideration
Describe the functionality desired 🐞

Per official docs BindingList<T>, which SourceCache can adapt to, supports bi-directional addition/removal/etc. DynamicData bindings to BindingList do not actually support that. This is problematic because many of third parrty controls, like DevExpress, assume that it's possible to add/remove the items from the BindingList they're bound to, and as a result this doesn't work well because the binding adaptor actually doesn't support such operations.

The steps the functionality will provide

I have a few different ideas on how this could be implemented.

  1. Possibly some sort of an overload for Bind operator. Because we no longer have the original SourceCache to operate on, and/or maybe we have a read-only cache, it may be beneficial to redirect the additions/removals to another cache. The backwards additions/removals would be handled automatically.
cache.Connect()
    .Filter(someFilter)
    .Bind(bindingList, flowbackTargetCache: cache)
    .Subscribe();
  1. Manual flowback subscription configuration. Not currently sure what the API should be, but maybe a similar way, jsut instead of simply specifiying cache you specify an Rx observable stream that links the binding list back to the cache as a side effect and is used to prevent recursive event triggering by the adaptor (jsut thoughts aloud for now, not actually sure if it'll work this way).
Considerations

Using SourceCache directly - adds an unnecessary dependency on DynamicData to the control libraries, kinda adds to vendor lock-in.

Lingua principale
C#
Stelle
1.9k
Fork
194
Merge medio
12m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di reactivemarbles/DynamicData

Tutte le issue di reactivemarbles/DynamicData

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.