Skip to content

Commit

Permalink
Merge pull request #22 from futurum-dev/feature/readme-setup-instruct…
Browse files Browse the repository at this point in the history
…ions

Update README.md with setup instructions.
  • Loading branch information
futurum-dev authored Dec 6, 2023
2 parents 54f677e + 1277c4c commit 313efb7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 313efb7

Please sign in to comment.