Move setting the IApplicationBuilder line to top.

pull/2599/head
Halil İbrahim Kalkan 5 years ago
parent 2d8b349a27
commit 8f0ce16a24

@ -20,6 +20,7 @@ namespace Microsoft.AspNetCore.Builder
{
Check.NotNull(app, nameof(app));
app.ApplicationServices.GetRequiredService<ObjectAccessor<IApplicationBuilder>>().Value = app;
var application = app.ApplicationServices.GetRequiredService<IAbpApplicationWithExternalServiceProvider>();
var applicationLifetime = app.ApplicationServices.GetRequiredService<IHostApplicationLifetime>();
@ -33,7 +34,6 @@ namespace Microsoft.AspNetCore.Builder
application.Dispose();
});
app.ApplicationServices.GetRequiredService<ObjectAccessor<IApplicationBuilder>>().Value = app;
application.Initialize(app.ApplicationServices);
}

Loading…
Cancel
Save