Skip to content

Commit 53f9a2a

Browse files
committed
Minor edits
1 parent 8fb92ce commit 53f9a2a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

READMe.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,23 @@ The method takes a list/array of assemblies to scan. Two typical ways of providi
6565

6666
#### 2. The `Where` method
6767

68-
Pretty straughtforward - you are provided with the `Type` of each class and
68+
Pretty straightforward - you are provided with the `Type` of each class and
6969
you can filter by any of the `Type` properties etc. This allows you to
7070
do things like only registering certain classes,
7171
e.g `Where(c => c.Name.EndsWith("Service"))`
7272

73-
*NOTE: Useful also if you want to register some classes with a different timetime scope.*
73+
*NOTE: Useful also if you want to register some classes with a different timetime scope -
74+
See next section.*
7475

7576
#### 3. The `AsPublicImplementedInterfaces` method
7677

7778
The `AsPublicImplementedInterfaces` method finds any public, non-nested interfaces
7879
(apart from `IDisposable`) that each class implements and registers each
7980
interface, known as *service type*, against the class, known as the *implementation type*.
81+
This means if you use an interface in a constructor (or other DI-enabled places)
82+
then the Microsoft DI resolver will provide an instance of the class that interface
83+
was linked to.
84+
*See [Microsoft DI Docs](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-2.1) for more on this*.*
8085
8186
By default it will register the classes as having a lifetime of `ServiceLifetime.Transient`,
8287
but there is a parameter that allows you to override that.

0 commit comments

Comments
 (0)