Updates webspa project to Net 6.0 (#1778)
* Included globalusing in webspa project * Included file scoped namespace for webspa project * Updated packages in WebSPA project
This commit is contained in:
parent
0823cb977d
commit
0ab198c20b
@ -1,12 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
namespace eShopOnContainers.WebSPA;
|
||||
|
||||
namespace eShopOnContainers.WebSPA
|
||||
public class AppSettings
|
||||
{
|
||||
public class AppSettings
|
||||
{
|
||||
public string IdentityUrl { get; set; }
|
||||
public string BasketUrl { get; set; }
|
||||
public string MarketingUrl { get; set; }
|
||||
@ -16,5 +11,4 @@ namespace eShopOnContainers.WebSPA
|
||||
|
||||
public string ActivateCampaignDetailFunction { get; set; }
|
||||
public bool UseCustomizationData { get; set; }
|
||||
}
|
||||
}
|
||||
|
27
src/Web/WebSPA/GlobalUsings.cs
Normal file
27
src/Web/WebSPA/GlobalUsings.cs
Normal file
@ -0,0 +1,27 @@
|
||||
global using eShopConContainers.WebSPA;
|
||||
global using Microsoft.AspNetCore;
|
||||
global using Microsoft.AspNetCore.Hosting;
|
||||
global using Microsoft.Extensions.Configuration;
|
||||
global using Microsoft.Extensions.Logging;
|
||||
global using Serilog;
|
||||
global using System.IO;
|
||||
global using eShopOnContainers.WebSPA;
|
||||
global using HealthChecks.UI.Client;
|
||||
global using Microsoft.AspNetCore.Antiforgery;
|
||||
global using Microsoft.AspNetCore.Builder;
|
||||
global using Microsoft.AspNetCore.DataProtection;
|
||||
global using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
global using Microsoft.AspNetCore.Http;
|
||||
global using Microsoft.AspNetCore.Mvc;
|
||||
global using Microsoft.AspNetCore.SpaServices.AngularCli;
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
global using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
global using Microsoft.Extensions.Hosting;
|
||||
global using StackExchange.Redis;
|
||||
global using System;
|
||||
global using WebSPA.Infrastructure;
|
||||
global using Microsoft.Extensions.Options;
|
||||
global using System.IO.Compression;
|
||||
global using System.Linq;
|
||||
global using System.Collections.Generic;
|
||||
global using System.Threading.Tasks;
|
@ -1,12 +1,4 @@
|
||||
using eShopConContainers.WebSPA;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Serilog;
|
||||
using System.IO;
|
||||
|
||||
BuildWebHost(args).Run();
|
||||
await BuildWebHost(args).RunAsync();
|
||||
|
||||
IWebHost BuildWebHost(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
|
@ -1,14 +1,8 @@
|
||||
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
|
||||
namespace eShopConContainers.WebSPA.Server.Controllers;
|
||||
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
using eShopOnContainers.WebSPA;
|
||||
|
||||
namespace eShopConContainers.WebSPA.Server.Controllers
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
private readonly IWebHostEnvironment _env;
|
||||
private readonly IOptionsSnapshot<AppSettings> _settings;
|
||||
|
||||
@ -21,5 +15,4 @@ namespace eShopConContainers.WebSPA.Server.Controllers
|
||||
{
|
||||
return Json(_settings.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,9 @@
|
||||
using eShopOnContainers.WebSPA;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
namespace WebSPA.Infrastructure;
|
||||
|
||||
namespace WebSPA.Infrastructure
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
public class WebContextSeed
|
||||
{
|
||||
public class WebContextSeed
|
||||
{
|
||||
public static void Seed(IApplicationBuilder applicationBuilder, IWebHostEnvironment env, ILoggerFactory loggerFactory)
|
||||
{
|
||||
var log = loggerFactory.CreateLogger<WebContextSeed>();
|
||||
@ -73,5 +64,4 @@ namespace WebSPA.Infrastructure
|
||||
log.LogError(ex, "ERROR in GetPreconfiguredImages: {Message}", ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,27 +1,7 @@
|
||||
using eShopOnContainers.WebSPA;
|
||||
using HealthChecks.UI.Client;
|
||||
using Microsoft.AspNetCore.Antiforgery;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SpaServices.AngularCli;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.IO;
|
||||
using WebSPA.Infrastructure;
|
||||
namespace eShopConContainers.WebSPA;
|
||||
|
||||
namespace eShopConContainers.WebSPA
|
||||
public class Startup
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
@ -160,5 +140,4 @@ namespace eShopConContainers.WebSPA
|
||||
services.AddApplicationInsightsTelemetry(Configuration);
|
||||
services.AddApplicationInsightsKubernetesEnricher();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,10 +37,10 @@
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.17.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.17.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="2.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="5.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-preview.7.21378.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.7" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.0-preview.7.21378.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="6.0.0-preview.7.21378.6" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user