Skip to content

Commit

Permalink
Merge pull request #15 from proudust/readme
Browse files Browse the repository at this point in the history
Fix typo in README.md
  • Loading branch information
neuecc authored Aug 9, 2023
2 parents 0718da8 + 3653cae commit bcf250c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public partial class DataTable<T> : ComponentBase, IDisposable

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
// WPF simple sample.
Expand All @@ -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
---
Expand Down Expand Up @@ -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.

View/SoretedView
View/SortedView
---
View can create from `IObservableCollection<T>`, it completely synchronized and thread-safe.

Expand Down Expand Up @@ -312,7 +312,7 @@ see [filter](#filter) section.

```csharp
var view = transform(value);
If (filter.IsMatch(value, view))
if (filter.IsMatch(value, view))
{
filter.WhenTrue(value, view);
}
Expand All @@ -338,7 +338,7 @@ public static ISynchronizedView<T, TView> CreateSortedView<T, TKey, TView, TComp
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
---
Expand Down Expand Up @@ -403,4 +403,4 @@ public static void Sort<T, TView, TCompare>(this ISortableSynchronizedView<T, TV

License
---
This library is licensed under the MIT License.
This library is licensed under the MIT License.

0 comments on commit bcf250c

Please sign in to comment.