1
0
mirror of https://github.com/bitwarden/server synced 2025-12-27 21:53:24 +00:00

update to net core 2.2

This commit is contained in:
Kyle Spearrin
2019-07-23 16:38:49 -04:00
parent 3422df325b
commit 94188fa0b5
43 changed files with 227 additions and 199 deletions

View File

@@ -2,13 +2,14 @@
<PropertyGroup>
<Version>1.30.4</Version>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>Bit.EventsProcessor</RootNamespace>
<UserSecretsId>bitwarden-EventsProcessor</UserSecretsId>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.10" />
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,5 +1,7 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Bit.Core.Utilities;
using Serilog.Events;
namespace Bit.EventsProcessor
{
@@ -10,6 +12,8 @@ namespace Bit.EventsProcessor
WebHost
.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.ConfigureLogging((hostingContext, logging) =>
logging.AddSerilog(hostingContext, e => e.Level >= LogEventLevel.Warning))
.Build()
.Run();
}

View File

@@ -5,9 +5,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.IdentityModel.Logging;
using Serilog.Events;
namespace Bit.EventsProcessor
{
@@ -29,7 +27,7 @@ namespace Bit.EventsProcessor
services.AddOptions();
// Settings
var globalSettings = services.AddGlobalSettingsServices(Configuration);
services.AddGlobalSettingsServices(Configuration);
// Hosted Services
services.AddHostedService<AzureQueueHostedService>();
@@ -38,12 +36,11 @@ namespace Bit.EventsProcessor
public void Configure(
IApplicationBuilder app,
IHostingEnvironment env,
ILoggerFactory loggerFactory,
IApplicationLifetime appLifetime,
GlobalSettings globalSettings)
{
IdentityModelEventSource.ShowPII = true;
loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Warning);
app.UseSerilog(env, appLifetime, globalSettings);
}
}
}