From 1277c4c78e17a21ad94e330383d11c28d1db3750 Mon Sep 17 00:00:00 2001 From: futurum-dev Date: Wed, 6 Dec 2023 04:06:02 +0000 Subject: [PATCH] Update README.md with setup instructions. --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 9ccf1e1..f07571a 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,30 @@ A dotnet library that extends Microsoft.Extensions.DependencyInjection by adding support for [attribute based registration](#attribute-based-registration), [modules](#modules) and [startables](#startables). +- [x] [Easy setup](#easy-setup) - [x] Autodiscovery of DependencyInjection registrations, based on [attributes](#attribute-based-registration) and Source Generators - [x] Autodiscovery of DependencyInjection modules, based on [attributes](#attribute-based-module) and Source Generators - [x] Autodiscovery of DependencyInjection startables, based on [attributes](#attribute-based-startable) and Source Generators - [x] [Roslyn Analysers](#roslyn-analysers) to help build your registrations, modules and startables, using best practices - [x] [Tested solution](https://coveralls.io/github/futurum-dev/dotnet.futurum.microsoft.extensions.dependencyinjection?branch=main) +## Easy setup +1. Install the [NuGet package](https://www.nuget.org/packages/futurum.microsoft.extensions.dependencyinjection) +2. Update *program.cs* as per [here](#programcs) + +### Program.cs +```csharp +builder.Services.AddDependencyInjectionFor...(); +``` + +#### AddDependencyInjectionFor... (per project containing registrations) +This will be automatically created by the source generator. + +e.g. +```csharp +builder.Services.AddDependencyInjectionForFuturumMicrosoftExtensionsDependencyInjectionSample(); +``` + ## Attribute based registration You can register services using attributes.