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

Ouverte
#853 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
csharp
Domaine
api

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
C#
Étoiles
1.9k
Forks
194
Merge moyen
12 min
PR mergées (30 j)
1

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de reactivemarbles/DynamicData

Toutes les issues de reactivemarbles/DynamicData

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.