TargetFramework update,

reference updates and added tests for Viewer
This commit is contained in:
2023-01-06 21:17:30 -07:00
parent 791724fdd4
commit f0c2140f93
82 changed files with 10187 additions and 1052 deletions

View File

@ -9,6 +9,7 @@ using OI.Metrology.Archive.Models;
using OI.Metrology.Archive.Repositories;
using OI.Metrology.Archive.Services;
using OI.Metrology.Shared.Models;
using OI.Metrology.Shared.Models.Stateless;
using OI.Metrology.Shared.Repositories;
using OI.Metrology.Shared.Services;
using Serilog;
@ -65,13 +66,13 @@ public class Program
{
_ = webApplicationBuilder.Services.Configure<ApiBehaviorOptions>(options => options.SuppressModelStateInvalidFilter = true);
_ = webApplicationBuilder.Services.AddControllersWithViews();
_ = new MetrologyRepo(new SQLDbConnectionFactory(_AppSettings), null);
_ = new MetrologyRepository(new SQLDbConnectionFactory(_AppSettings), null);
_ = webApplicationBuilder.Services.AddDistributedMemoryCache();
_ = webApplicationBuilder.Services.AddMemoryCache();
_ = webApplicationBuilder.Services.AddSingleton<AppSettings, AppSettings>(_ => _AppSettings);
_ = webApplicationBuilder.Services.AddScoped<IAttachmentsService, AttachmentsService>();
_ = webApplicationBuilder.Services.AddScoped<IInboundDataService, InboundDataService>();
_ = webApplicationBuilder.Services.AddScoped<IMetrologyRepo, MetrologyRepo>();
_ = webApplicationBuilder.Services.AddScoped<IMetrologyRepository, MetrologyRepository>();
_ = webApplicationBuilder.Services.AddScoped<IRdsMaxRepo, RdsMaxRepo>();
_ = webApplicationBuilder.Services.AddSingleton<IDbConnectionFactory, SQLDbConnectionFactory>();
_ = webApplicationBuilder.Services.AddSwaggerGen();
@ -87,8 +88,10 @@ public class Program
_ = webApplicationBuilder.Services.AddSingleton<IHostLifetime, WindowsServiceLifetime>();
_ = webApplicationBuilder.Logging.AddEventLog(settings =>
{
#pragma warning disable CA1416
if (string.IsNullOrEmpty(settings.SourceName))
settings.SourceName = webApplicationBuilder.Environment.ApplicationName;
#pragma warning restore
});
}
WebApplication webApplication = webApplicationBuilder.Build();