refacto name spaces
This commit is contained in:
parent
654065d7fe
commit
94eb8e2fff
108 changed files with 1839 additions and 282 deletions
|
|
@ -1,12 +1,10 @@
|
|||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using isnd.Data;
|
||||
using System.Linq;
|
||||
using isnd.ViewModels;
|
||||
using Unleash;
|
||||
using System.Reflection;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Isn.Abstract;
|
||||
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
|
|
@ -16,31 +14,38 @@ namespace isnd.Controllers
|
|||
public class HomeController : Controller
|
||||
{
|
||||
private readonly ApplicationDbContext _dbContext;
|
||||
private readonly IUnleash _unleashĈlient;
|
||||
private readonly IUnleash _unleashClient;
|
||||
/// <summary>
|
||||
/// Home controller ctor
|
||||
/// </summary>
|
||||
/// <param name="dbContext"></param>
|
||||
/// <param name="unleashĈlient"></param>
|
||||
/// <param name="unleashClient"></param>
|
||||
|
||||
public HomeController(
|
||||
ApplicationDbContext dbContext,
|
||||
IUnleash unleashĈlient)
|
||||
IUnleash unleashClient)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
_unleashĈlient = unleashĈlient;
|
||||
_unleashClient = unleashClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Index
|
||||
*/
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View(new HomeIndexViewModel{
|
||||
return View(new HomeIndexViewModel
|
||||
{
|
||||
PkgCount = _dbContext.Packages
|
||||
.Where(p => p.Versions.Count > 0)
|
||||
.Count(),
|
||||
UnleashClient = _unleashĈlient
|
||||
});
|
||||
UnleashClient = _unleashClient
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* About
|
||||
*/
|
||||
public IActionResult About()
|
||||
{
|
||||
ViewData["Message"] = "Your application description page.";
|
||||
|
|
@ -48,18 +53,24 @@ namespace isnd.Controllers
|
|||
return View();
|
||||
}
|
||||
|
||||
/**
|
||||
* Contact
|
||||
*/
|
||||
public IActionResult Contact()
|
||||
{
|
||||
ViewData["Message"] = "Your contact page.";
|
||||
var ass = typeof(isn.Abstract.Resource).GetType().Assembly;
|
||||
var ass = typeof(Resource).GetType().Assembly;
|
||||
var attrs = ass.GetCustomAttributes(true);
|
||||
// ass.GetCustomAttributes(true);
|
||||
System.Reflection.AssemblyFileVersionAttribute v = (AssemblyFileVersionAttribute)
|
||||
System.Reflection.AssemblyFileVersionAttribute v = (AssemblyFileVersionAttribute)
|
||||
GetType().Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute));
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
/**
|
||||
* Privacy
|
||||
*/
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
ViewData["Message"] = "Your Privacy page.";
|
||||
|
|
@ -67,6 +78,9 @@ namespace isnd.Controllers
|
|||
return View(ViewData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Error
|
||||
*/
|
||||
public IActionResult Error()
|
||||
{
|
||||
return View();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue