karaoke-dev/karaoke

Think how to invalidate or validate the working property if property type is list or dictionary.

Opened this issue · 1 comments

In this PR(#1885), we invalidate and validate the property by the setter, but IList<T> or IDictionary<TKey,TValue> can call Add() or Remove() to adjust the object.

Maybe:

  • We need bindable event to invalidate the working property.
  • All working property should be assign only, means we need to use IReadonlyList<T> or IReadonlyDictionary<TKey,TValue>. And the bindable should be readonly also.

So it means:

  • We need to use the bindable to invalidate the working property.
  • We can use the setter to validate the working property.