Merge pull request #15 from proudust/readme

Fix typo in README.md
This commit is contained in:
Yoshifumi Kawai 2023-08-09 18:47:22 +09:00 committed by GitHub
commit bcf250c631
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,7 @@ public partial class DataTable<T> : ComponentBase, IDisposable
WPF WPF
--- ---
Because of data binding in WPF, it is important that the collection is Observable. ObservableCollections high-performance `IObservableCollection<T>` cannot be bind to WPF. Call `WithtINotifyCollectionChanged` to convert it to `INotifyCollectionChanged`. Also, although ObservableCollections and Views are thread-safe, the WPF UI does not support change notifications from different threads. `BindingOperations.EnableCollectionSynchronization` to work safely with change notifications from different threads. Because of data binding in WPF, it is important that the collection is Observable. ObservableCollections high-performance `IObservableCollection<T>` cannot be bind to WPF. Call `WithINotifyCollectionChanged` to convert it to `INotifyCollectionChanged`. Also, although ObservableCollections and Views are thread-safe, the WPF UI does not support change notifications from different threads. `BindingOperations.EnableCollectionSynchronization` to work safely with change notifications from different threads.
```csharp ```csharp
// WPF simple sample. // WPF simple sample.
@ -199,7 +199,7 @@ protected override void OnClosed(EventArgs e)
} }
``` ```
> WPF can not use SoretedView beacuse SortedView can not provide sort event to INotifyCollectionChanged. > WPF can not use SortedView because SortedView can not provide sort event to INotifyCollectionChanged.
Unity Unity
--- ---
@ -274,7 +274,7 @@ public class SampleScript : MonoBehaviour
It is also possible to manage Order by managing indexes inserted from eventArgs, but it is very difficult with many caveats. If you don't have major performance issues, you can foreach the View itself on CollectionStateChanged (like Blazor) and reorder the transforms. If you have such a architecture, you can also use SortedView. It is also possible to manage Order by managing indexes inserted from eventArgs, but it is very difficult with many caveats. If you don't have major performance issues, you can foreach the View itself on CollectionStateChanged (like Blazor) and reorder the transforms. If you have such a architecture, you can also use SortedView.
View/SoretedView View/SortedView
--- ---
View can create from `IObservableCollection<T>`, it completely synchronized and thread-safe. View can create from `IObservableCollection<T>`, it completely synchronized and thread-safe.
@ -312,7 +312,7 @@ see [filter](#filter) section.
```csharp ```csharp
var view = transform(value); var view = transform(value);
If (filter.IsMatch(value, view)) if (filter.IsMatch(value, view))
{ {
filter.WhenTrue(value, view); filter.WhenTrue(value, view);
} }
@ -338,7 +338,7 @@ public static ISynchronizedView<T, TView> CreateSortedView<T, TKey, TView, TComp
where TKey : notnull where TKey : notnull
``` ```
> Notice: foreach ObservableCollections and Views are thread-safe but it uses lock at iterating. In other words, the obtained Enumerator must be Dispose. foreach and LINQ are guaranteed to be Dipose, but be careful when you extract the Enumerator by yourself. > Notice: foreach ObservableCollections and Views are thread-safe but it uses lock at iterating. In other words, the obtained Enumerator must be Dispose. foreach and LINQ are guaranteed to be Dispose, but be careful when you extract the Enumerator by yourself.
Filter Filter
--- ---
@ -403,4 +403,4 @@ public static void Sort<T, TView, TCompare>(this ISortableSynchronizedView<T, TV
License License
--- ---
This library is licensed under the MIT License. This library is licensed under the MIT License.