[英]ASP.NET Core - IStartupFilter equivalent for ConfigureServices?
I need something to extend my middleware pipeline with new ConfigureServices
methods.我需要一些东西来使用新的
ConfigureServices
方法扩展我的中间件管道。 I'm already using the IStartupFilter
class which works great for the Configure
method, but I'm looking to achieve the same for the ConfigureServices
method.我已经在使用
IStartupFilter
class,它非常适合Configure
方法,但我希望为ConfigureServices
方法实现相同的效果。
I read online about the IStartupConfigureServicesFilter
class, but it's deprecated and no longer in use ( source ).我在线阅读了有关
IStartupConfigureServicesFilter
class 的信息,但它已被弃用且不再使用( 来源)。
Is there anything else I can use to achieve this?还有什么我可以用来实现这一目标的吗?
Try this StartupModules NuGet , it gives you the ability to separate startup configuration.试试这个StartupModules NuGet ,它使您能够分离启动配置。
Be careful with middlewares, because those modules will not be ordered at runtime.小心使用中间件,因为这些模块不会在运行时排序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.