Included scoped namespace

This commit is contained in:
Sumit Ghosh 2021-11-15 18:56:11 +05:30
parent d4d70ab821
commit 3e769f9972
3 changed files with 88 additions and 117 deletions

View File

@ -1,9 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using System.Linq;
namespace WebStatus.Controllers;
namespace WebStatus.Controllers
{
public class HomeController : Controller
{
private IConfiguration _configuration;
@ -38,4 +34,3 @@ namespace WebStatus.Controllers
return View();
}
}
}

View File

@ -1,17 +1,4 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Serilog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using WebStatus;
using Azure.Identity;
using Azure.Core;
var configuration = GetConfiguration();
var configuration = GetConfiguration();
Log.Logger = CreateSerilogLogger(configuration);
@ -116,7 +103,7 @@ void LogPackagesVersionInfo()
Log.Logger.ForContext("PackageVersions", string.Join("\n", versionList)).Information("Package versions ({ApplicationContext})", Program.AppName);
}
public class Program
public partial class Program
{
private static readonly string _namespace = typeof(Startup).Namespace;
public static readonly string AppName = _namespace;

View File

@ -1,15 +1,5 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace WebStatus;
namespace WebStatus
{
public class Startup
{
public Startup(IConfiguration configuration)
@ -84,4 +74,3 @@ namespace WebStatus
services.AddApplicationInsightsKubernetesEnricher();
}
}
}