File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff 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
6969you can filter by any of the `Type ` properties etc . This allows you to
7070do things like only registering certain classes ,
7171e .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
7778The `AsPublicImplementedInterfaces ` method finds any public , non - nested interfaces
7879(apart from `IDisposable `) that each class implements and registers each
7980interface , 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
8186By default it will register the classes as having a lifetime of `ServiceLifetime .Transient `,
8287but there is a parameter that allows you to override that .
You can’t perform that action at this time.
0 commit comments