You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
无论
PluginFinderV2 还是PluginFinderV1都出现了
protected virtual object ResolveUnregistered(Type type)
{
Exception innerException = null;
foreach (var constructor in type.GetConstructors())
{
try
{
//try to resolve constructor parameters
var parameters = constructor.GetParameters().Select(parameter =>
{
//var service = Resolve(parameter.ParameterType);
var t = type;
//var service = _serviceProvider.GetService(parameter.ParameterType);
using (var scope = _serviceScopeFactory.CreateScope())
{
var service = scope.ServiceProvider.GetService(parameter.ParameterType);
if (service == null)
throw new Exception("Unknown dependency");
return service;
}
});
//all is ok, so create instance
return Activator.CreateInstance(type, parameters.ToArray());
}
catch (Exception ex)
{
innerException = ex;
}
}
throw new Exception("No constructor was found that had all the dependencies satisfied.", innerException);
无论
PluginFinderV2 还是PluginFinderV1都出现了
protected virtual object ResolveUnregistered(Type type)
{
Exception innerException = null;
foreach (var constructor in type.GetConstructors())
{
try
{
//try to resolve constructor parameters
var parameters = constructor.GetParameters().Select(parameter =>
{
//var service = Resolve(parameter.ParameterType);
var t = type;
//var service = _serviceProvider.GetService(parameter.ParameterType);
using (var scope = _serviceScopeFactory.CreateScope())
{
var service = scope.ServiceProvider.GetService(parameter.ParameterType);
if (service == null)
throw new Exception("Unknown dependency");
return service;
}
});
}
这个里面的Unknown dependency 异常,上传的两个插件是HelloWorldPlugin和HexoPlugin
The text was updated successfully, but these errors were encountered: