We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
您好,我们看代码中发现以下实例生命周期作用域有冲突: IPropertyInjectorFactory 接口是Scope作用域,但是InterceptorCollector作用域是Singleton单例,InterceptorCollector中引用了IPropertyInjectorFactory ,也就是在Singleton的实例中引用了Scope,这个设计是不是不合理的? System.InvalidOperationException: Cannot consume scoped service 'AspectCore.DependencyInjection.IPropertyInjectorFactory' from singleton 'AspectCore.DynamicProxy.IInterceptorCollector'. at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteValidator.VisitScopeCache(ServiceCallSite scopedCallSite, CallSiteValidatorState state) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteValidator.VisitConstructor(ConstructorCallSite constructorCallSite, CallSiteValidatorState state) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
System.InvalidOperationException: Cannot consume scoped service 'AspectCore.DependencyInjection.IPropertyInjectorFactory' from singleton 'AspectCore.DynamicProxy.IInterceptorCollector'. at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteValidator.VisitScopeCache(ServiceCallSite scopedCallSite, CallSiteValidatorState state) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
The text was updated successfully, but these errors were encountered:
感谢指正 。 PropertyInjectorFactory 使用单例其实是没问题的
Sorry, something went wrong.
No branches or pull requests
您好,我们看代码中发现以下实例生命周期作用域有冲突:
IPropertyInjectorFactory 接口是Scope作用域,但是InterceptorCollector作用域是Singleton单例,InterceptorCollector中引用了IPropertyInjectorFactory ,也就是在Singleton的实例中引用了Scope,这个设计是不是不合理的?
System.InvalidOperationException: Cannot consume scoped service 'AspectCore.DependencyInjection.IPropertyInjectorFactory' from singleton 'AspectCore.DynamicProxy.IInterceptorCollector'. at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteValidator.VisitScopeCache(ServiceCallSite scopedCallSite, CallSiteValidatorState state) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(ServiceCallSite callSite, TArgument argument)at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteValidator.VisitConstructor(ConstructorCallSite constructorCallSite, CallSiteValidatorState state)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
The text was updated successfully, but these errors were encountered: