REORG
This commit is contained in:
parent
dc30540e40
commit
34d0c3c4fe
16 changed files with 241 additions and 37 deletions
52
src/isnd/Controllers/Packages/PackagesController.cs
Normal file
52
src/isnd/Controllers/Packages/PackagesController.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using NuGet.Versioning;
|
||||
using isnd.Data;
|
||||
using isnd.Entities;
|
||||
using Unleash;
|
||||
using isnd.Services;
|
||||
using isnd.ViewModels;
|
||||
using System.Threading.Tasks;
|
||||
using isnd.Interfaces;
|
||||
using isn.Abstract;
|
||||
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
[AllowAnonymous]
|
||||
public partial class PackagesController : Controller
|
||||
{
|
||||
const int maxTake = 100;
|
||||
private readonly Resource[] resources;
|
||||
private readonly ILogger<PackagesController> logger;
|
||||
private readonly IDataProtector protector;
|
||||
|
||||
private readonly IsndSettings isndSettings;
|
||||
readonly ApplicationDbContext dbContext;
|
||||
private readonly IPackageManager packageManager;
|
||||
private readonly IUnleash unleashĈlient;
|
||||
|
||||
public PackagesController(
|
||||
ILoggerFactory loggerFactory,
|
||||
IDataProtectionProvider provider,
|
||||
IOptions<IsndSettings> isndOptions,
|
||||
IUnleash unleashĈlient,
|
||||
ApplicationDbContext dbContext,
|
||||
IPackageManager pm)
|
||||
{
|
||||
logger = loggerFactory.CreateLogger<PackagesController>();
|
||||
isndSettings = isndOptions.Value;
|
||||
protector = provider.CreateProtector(isndSettings.ProtectionTitle);
|
||||
this.dbContext = dbContext;
|
||||
packageManager = pm;
|
||||
this.unleashĈlient = unleashĈlient;
|
||||
resources = packageManager.GetResources(unleashĈlient).ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue