Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Autofac.Extensions.DependencyInjection to Volo.Abp.Autofac module. #6463

Merged
merged 2 commits into from
Jan 3, 2021

Conversation

maliming
Copy link
Member

@maliming maliming commented Dec 3, 2020

It would be simpler if autofac made the AutofacServiceProvider class public. autofac/Autofac.Extensions.DependencyInjection#85

builder.RegisterType<AutofacServiceProvider>().As<IServiceProvider>().ExternallyOwned();

var autofacServiceScopeFactory = typeof(AutofacServiceProvider).Assembly.GetType("Autofac.Extensions.DependencyInjection.AutofacServiceScopeFactory");
if (autofacServiceScopeFactory == null)
{
	throw new AbpException("Unable get type of Autofac.Extensions.DependencyInjection.AutofacServiceScopeFactory!");
}
builder.RegisterType(autofacServiceScopeFactory).As<IServiceScopeFactory>();

@maliming maliming added this to the 4.1-preview milestone Dec 3, 2020
@hikalkan hikalkan modified the milestones: 4.1-preview, 4.2-preview Dec 16, 2020
@hikalkan hikalkan merged commit 33c86c9 into dev Jan 3, 2021
@hikalkan hikalkan deleted the maliming/Autofac.Extensions.DependencyInjection branch January 3, 2021 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants