Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym authored Jan 11, 2021
1 parent 3d83832 commit 50408e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ Service are resolved from the scope using the `GetService<IService>()` call.
internal partial class MyServiceProvider { }

MyServiceProvider c = new MyServiceProvider();
MyServiceProvider.Scope scope = c.CreateScope();
using MyServiceProvider.Scope scope = c.CreateScope();
IService service = scope.GetService<IService>();
```

When the scope is disposed all `IDisposable` and `IAsyncDisposable` services that were resolved from it are disposed as well.

### Modules

Often, a set of service registrations would represent a distinct set of functionality that can be included into arbitrary
Expand Down

0 comments on commit 50408e1

Please sign in to comment.