An open API service indexing awesome lists of open source software.

https://github.com/kant2002/storekeeper.samples

Samples for StoreKeeper DI augmentation lib
https://github.com/kant2002/storekeeper.samples

Last synced: over 1 year ago
JSON representation

Samples for StoreKeeper DI augmentation lib

Awesome Lists containing this project

README

          

StoreKeeper Samples
===================

This is samples for the [StoreKeeper](https://github.com/kant2002/storekeeper) which augments your DI container to make it work in Reflection-free mode.

You add Nuget package.

```sh
dotnet add package StoreKeeper
```

Then you add custom Nuget feed for latest NativeAOT compiler with fixes.
```sh
dotnet new nugetoconfig
```

Add `dotnet7` feed to nuget.config
```xml

```

And that's it unless you are using open generics as service registration.
```csharp
// Build your DI container as usual.
var serviceCollection = new ServiceCollection();
serviceCollection.AddScoped();
var provider = serviceCollection.BuildServiceProvider();

// Use your service provider as usual.
var wrapper = provider.GetRequiredService();
wrapper.WriteLine("Bye Bye Reflection!");
```