From 39f83d30ee36191627284f10a95ca08d9b385962 Mon Sep 17 00:00:00 2001 From: Macocian Alexandru Victor Date: Fri, 9 Sep 2022 16:24:53 +0200 Subject: [PATCH] Update Readme (#22) --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c457bb..dee56a4 100644 --- a/README.md +++ b/README.md @@ -88,4 +88,16 @@ serviceManager.GetServicesOfType(); ``` This will return an `IEnumerable` with all the services which implement the `ISharedInterface`. -In order to give priority to certain constructors in a class, mark the constructors with `[PreferredConstructor]` attribute. `ServiceManager` will prioritize those constructors. \ No newline at end of file +In order to give priority to certain constructors in a class, mark the constructors with `[PreferredConstructor]` attribute. `ServiceManager` will prioritize those constructors. + +## Slim Integration with Microsoft.Extensions.DependencyInjection + +Slim.Integration package helps integrate with existing solutions. + +`SlimServiceContainer` provides an implementation for the `IServiceContainer` from `System.ComponentModel.Design`. + +`ServiceCollectionExtensions` contains an extension to the `ServiceCollection` which returns a `ServiceManager` as an `IServiceProvider`, capable of supporting all `ServiceLifetime` and provides support for `IServiceScope`. +Call the extension to use the Slim implementation of `IServiceProvider`. +```C# +services.BuildSlimServiceProvider(); +``` \ No newline at end of file