Passage à ASP.NET vNext

This commit is contained in:
Paul Schneider 2016-05-17 18:22:18 +02:00
commit 388b004837
1929 changed files with 104611 additions and 235941 deletions

View file

@ -0,0 +1,23 @@
using System.IO;
using Microsoft.AspNet.FileProviders;
using Yavsc.Models;
namespace Yavsc.Helpers
{
public static class FileSystemHelpers {
public static IDirectoryContents GetFileContent(this Estimate estimate, string userFileDir)
{
if (estimate?.Command?.PerformerProfile?.Performer == null)
return null;
var fsp = new PhysicalFileProvider(
Path.Combine(
userFileDir,
estimate.Command.PerformerProfile.Performer.UserName
));
return fsp.GetDirectoryContents(
Path.Combine(Constants.UserBillsFilesDir, estimate.Id.ToString())
);
}
}
}