part of the extensibility works now

This commit is contained in:
2020-05-22 21:19:49 +02:00
parent 410bfcc95c
commit 897b801cd4
19 changed files with 310 additions and 221 deletions
+34 -1
View File
@@ -1,5 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using FluentValidation;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@@ -24,6 +26,37 @@ namespace zero.Debug.Controllers
}
[HttpGet]
public IActionResult Services()
{
List<object> items = new List<object>();
foreach (var service in Startup.Services)
{
if (!service.ServiceType.FullName.StartsWith("zero.") && (service.ImplementationType == null || !service.ImplementationType.FullName.StartsWith("zero.")))
{
continue;
}
items.Add(new
{
name = service.ServiceType.FullName,
lifetime = service.Lifetime,
instance = service.ImplementationType?.FullName
});
}
return Json(items);
}
[HttpGet]
public IActionResult Things([FromServices] IValidator<Application> appValidator)
{
return Ok();
}
[HttpGet]
public async Task<IActionResult> Index()
{