Skip to content

kant2002/StoreKeeper.Samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StoreKeeper Samples

This is samples for the StoreKeeper which augments your DI container to make it work in Reflection-free mode.

You add Nuget package.

dotnet add package StoreKeeper

Then you add custom Nuget feed for latest NativeAOT compiler with fixes.

dotnet new nugetoconfig

Add dotnet7 feed to nuget.config

<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />

And that's it unless you are using open generics as service registration.

// Build your DI container as usual.
var serviceCollection = new ServiceCollection();
serviceCollection.AddScoped<ConsoleWrapper>();
var provider = serviceCollection.BuildServiceProvider();

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

About

Samples for StoreKeeper DI augmentation lib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages