Skip to content
New issue

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

插件 支持 ConfigureServices(IServiceCollection services)Configure(IApplicationBuilder app, IWebHostEnvironment env) #41

Open
yiyungent opened this issue Aug 16, 2021 · 1 comment

Comments

@yiyungent
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

插件如何 注入服务,以及添加 Middleware

Describe the solution you'd like
A clear and concise description of what you want to happen.

public interface IStartupPlugin : IPlugin
{
  /// <summary>
  /// This method gets called by the runtime. Use this method to add services to the container.
  /// </summary>
  /// <param name="services"></param>
  void ConfigureServices(IServiceCollection services);
  
  /// <summary>
  /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
  /// </summary>
  /// <param name="app"></param>
  /// <param name="env"></param>
  void Configure(IApplicationBuilder app);
}

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Middleware 目测必须重新组建,因此没法热插拔,可以考虑对实现了 IStartupPlugin 插件,进行重启

Additional context
Add any other context or screenshots about the feature request here.

@xubinhua888
Copy link

这个现在支持了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants