如何在ServiceUtility类中为IHostingEnvironment创建构造函数依赖项。如何在Startup ConfigureServices方法中绑定IHostEnvironment的依赖项。
自定义类
public class ServiceUtility
{
private IHostingEnvironment _environment;
public ServiceUtility(IHostingEnvironment environment)
{
_environment = environment;
}
}