juner / Prism.Extensions.ServiceCollection

Prism use IServiceCollection Extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prism.Extensions.ServiceCollection

This is a library for using containers other than Microsoft.Exntesions.DependencyInjection without being affected by the container settings.

add Container.RegisterServices(IServiceCollection) method.

how to use

install DryIoc.Microsoft.DependencyInjection.Extension

Prism.DryIoc

using DryIoc.Microsoft.DependencyInjection.Extension
// ...
Registry.GetContainer().RegisterServices(v =>
{
    v.AddTransient<IA>(v => new A1());
});
// ...

DryIoc

using DryIoc.Microsoft.DependencyInjection.Extension
// ...
Container.RegisterServices(v =>
{
    v.AddTransient<IA>(v => new A1());
});
// ...

About

Prism use IServiceCollection Extension

License:MIT License


Languages

Language:C# 100.0%