出于调试目的,是否有一种方法可以跟踪Asp Net Core中的依赖关系框架在什么范围内解析了哪种类型?
关注IServiceProviderEngineCallback
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.Extensions.DependencyInjection.ServiceLookup
{
internal interface IServiceProviderEngineCallback
{
void OnCreate(IServiceCallSite callSite);
void OnResolve(Type serviceType, IServiceScope scope);
}
}
和其他内部类...有没有办法钩入“ OnResolve”?