Upgrade packages to .net 10
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Microsoft.OpenApi;
|
||||
|
||||
namespace Rsdo.Concordancer.Api.Controllers;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using MailKit.Security;
|
||||
using Serilog;
|
||||
using Serilog.Configuration;
|
||||
using Serilog.Events;
|
||||
using Serilog.Sinks.Email;
|
||||
|
||||
namespace Rsdo.Concordancer.Api.Framework;
|
||||
|
||||
@@ -23,25 +23,25 @@ public static class SerilogExtensions
|
||||
int batchPostingLimit = 100,
|
||||
string mailSubject = "Log Email")
|
||||
{
|
||||
var connectionInfo = new EmailConnectionInfo()
|
||||
{
|
||||
FromEmail = fromEmail,
|
||||
ToEmail = toEmail,
|
||||
EmailSubject = mailSubject,
|
||||
MailServer = mailServer,
|
||||
Port = port,
|
||||
EnableSsl = enableSsl,
|
||||
};
|
||||
|
||||
NetworkCredential credentials = null;
|
||||
if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password))
|
||||
{
|
||||
connectionInfo.NetworkCredentials = new NetworkCredential()
|
||||
credentials = new NetworkCredential()
|
||||
{
|
||||
UserName = userName,
|
||||
Password = password,
|
||||
};
|
||||
}
|
||||
|
||||
return sinkConfiguration.Email(connectionInfo: connectionInfo, restrictedToMinimumLevel: restrictedToMinimumLevel);
|
||||
return sinkConfiguration.Email(
|
||||
from: fromEmail,
|
||||
to: toEmail,
|
||||
host: mailServer,
|
||||
port: port,
|
||||
connectionSecurity: enableSsl ? SecureSocketOptions.Auto : SecureSocketOptions.None,
|
||||
credentials: credentials,
|
||||
subject: mailSubject,
|
||||
body: outputTemplate,
|
||||
restrictedToMinimumLevel: restrictedToMinimumLevel);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Microsoft.OpenApi;
|
||||
using Rsdo.Concordancer.Api.Controllers;
|
||||
using Rsdo.Concordancer.Api.Framework;
|
||||
using Rsdo.Concordancer.Core.Constants;
|
||||
@@ -85,7 +85,11 @@ public class Startup
|
||||
// we would have to build the container which would (at this point) double singletons.
|
||||
// So we are duplicated code from ConnectionStringProvider
|
||||
var connectionString = Configuration[ConfigurationKey.Database.MasterConnectionString];
|
||||
x.UsePostgreSqlStorage(connectionString);
|
||||
x.UsePostgreSqlStorage(
|
||||
options =>
|
||||
{
|
||||
options.UseNpgsqlConnection(connectionString);
|
||||
});
|
||||
x.UseMediator();
|
||||
});
|
||||
services.AddHangfireServer();
|
||||
|
||||
Reference in New Issue
Block a user