2023-03-19 17:57:55 +00:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2019-08-21 17:23:58 +01:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Yavsc.Helpers;
|
|
|
|
|
using Yavsc.ViewModels.UserFiles;
|
2017-01-13 16:31:40 +01:00
|
|
|
|
|
|
|
|
namespace Yavsc.ViewComponents
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public class DirectoryViewComponent : ViewComponent
|
|
|
|
|
{
|
|
|
|
|
public async Task<IViewComponentResult> InvokeAsync(string dirname)
|
|
|
|
|
{
|
|
|
|
|
IViewComponentResult result = null;
|
|
|
|
|
await Task.Run(() =>
|
|
|
|
|
{
|
2018-03-26 21:31:20 +02:00
|
|
|
result = View(new UserDirectoryInfo(AbstractFileSystemHelpers.UserFilesDirName, User.Identity.Name, dirname));
|
2017-01-13 16:31:40 +01:00
|
|
|
});
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-03-19 17:57:55 +00:00
|
|
|
}
|