Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
runceel committed Sep 28, 2019
1 parent c9f9795 commit 300013a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README_COLLECTIONS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Livet.Collections
## Livet.Collections

Livet collections is a copy of StatefulModel.
Original is using `StatefulModel` namespace, this package is using `Livet.Collections` namespace.

## NotifyCollections
### NotifyCollections

the classes that implement `ISynchronizableNotifyChangedCollection<T>` have ToSyncedXXX Methods (XXX ... any `ISynchronizableNotifyChangedCollection<T>`).

Expand All @@ -12,7 +12,7 @@ ToSyncedXXX Methods is creating one-way synchronized collection with source coll
![image](./Images/collectionoverview.png)
![image](./Images/readonlywrapper.png)

###Simple Usage
#### Simple Usage
```csharp
//thread-safe collection
var source = new ObservableSynchronizedCollection<int>(Enumerable.Range(1,3));
Expand All @@ -24,10 +24,10 @@ ToSyncedXXX Methods is creating one-way synchronized collection with source coll
var dispatcherSource = new SynchronizationContextCollection<int>(Enumerable.Range(1,5),context);
```

### Sync Collections
#### Sync Collections
While creating one-way synchronized collection, this method lock source collection, so no leak items.
![image](./Images/syncCollections.png)

### Detach
#### Detach
`ISynchronizableNotifyChangedCollection<T>` is IDisposable. When Dispose() called , all EventHandler from source collection will be detached.
![image](./Images/detach.png)

0 comments on commit 300013a

Please sign in to comment.