Browse Source

Move setting the IApplicationBuilder line to top.

pull/2599/head
Halil İbrahim Kalkan 7 years ago
parent
commit
8f0ce16a24
  1. 2
      framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs

2
framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs

@ -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