Skip to content

Commit c0024e4

Browse files
authored
Merge pull request #110 from bazyleu/feature/readme-updates
UpdateREADME.md with available API and example usage for Disposable
2 parents 82d8aed + 747f14a commit c0024e4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,13 @@ Disposables are a part of `StateBase` that allow users to tie `IDisposable` refe
483483
lifetime, guaranteeing disposal and delegate execution on state's `Dispose`, without overriding the method
484484

485485
```csharp
486+
// Available API
487+
Disposables.Add(fooDisposable);
488+
Disposables.Add(() => Unsubscribe());
489+
Disposables.Add(fooDisposable, barDisposable);
490+
Disposables.ThenAdd(fooDisposable).ThenAdd(barDisposable).ThenAdd(() => Unsubscribe());
491+
492+
// Example Usage
486493
public class LoadingState : StateBase<ILoadingScreenView>
487494
{
488495
private CancellationTokenSource _loadingCts;

0 commit comments

Comments
 (0)