24 lines
678 B
C#
24 lines
678 B
C#
using System;
|
|
using System.Reflection;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.ApplicationParts;
|
|
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
|
|
|
|
namespace ApplicationWithCustomInputFiles.Controllers
|
|
{
|
|
public class HomeController : Controller
|
|
{
|
|
public IActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public string GetPrecompiledResourceNames([FromServices] ApplicationPartManager applicationManager)
|
|
{
|
|
var feature = new ViewsFeature();
|
|
applicationManager.PopulateFeature(feature);
|
|
return string.Join(Environment.NewLine, feature.Views.Keys);
|
|
}
|
|
}
|
|
}
|