/// <summary> /// This method gets called for each tenant. Use this method to configure the request's pipeline. /// </summary> /// <param name="configure">The action to execute when configuring the request's pipeling for a tenant.</param> /// <param name="order">The order of the action to execute. Lower values will be executed first.</param> public BlocksCoreBuilder Configure(Action <IApplicationBuilder, IRouteBuilder, IServiceProvider> configure, int order = 0) { if (!_actions.TryGetValue(order, out var actions)) { actions = _actions[order] = new StartupActions(order); ApplicationServices.AddTransient <IStartup>(sp => new StartupActionsStartup( sp.GetRequiredService <IServiceProvider>(), actions, order)); } actions.ConfigureActions.Add(configure); return(this); }
public StartupActionsStartup(IServiceProvider serviceProvider, StartupActions actions, int order) { _serviceProvider = serviceProvider; _actions = actions; Order = order; }