un positionnement de paramètre workflow des pros

This commit is contained in:
Paul Schneider 2017-01-13 16:31:40 +01:00
commit 96746fcc0b
322 changed files with 25893 additions and 3844 deletions

View file

@ -9,7 +9,7 @@ namespace Yavsc.ViewModels.UserFiles
{
public string UserName { get; private set; }
public string SubPath { get; private set; }
public UserFileInfo [] Files {
public DefaultFileInfo [] Files {
get; private set;
}
public string [] SubDirectories { 
@ -22,12 +22,12 @@ namespace Yavsc.ViewModels.UserFiles
var finalPath = (path==null) ? username : username + Path.DirectorySeparatorChar + path;
if ( !finalPath.IsValidPath() )
throw new InvalidOperationException(
$"File name contains invalid chars, using path {SubPath}");
$"File name contains invalid chars, using path {finalPath}");
dInfo = new DirectoryInfo(
Path.Combine(Startup.UserFilesDirName,finalPath));
Files = dInfo.GetFiles().Select
( entry => new UserFileInfo { Name = entry.Name, Size = entry.Length,
( entry => new DefaultFileInfo { Name = entry.Name, Size = entry.Length,
CreationTime = entry.CreationTime, LastModified = entry.LastWriteTime }).ToArray();
SubDirectories = dInfo.GetDirectories().Select
( d=> d.Name ).ToArray();

View file

@ -2,9 +2,8 @@ using System;
namespace Yavsc.ViewModels
{
public class UserFileInfo
public class DefaultFileInfo
{
public string Name { get; set; }
public long Size { get; set; }
@ -12,6 +11,8 @@ namespace Yavsc.ViewModels
public DateTime CreationTime { get; set; }
public DateTime LastModified { get; set; }
}
}