refactoring

vnext
Paul Schneider 8 years ago
parent 7ab6c62fc2
commit ff29deee24
2 changed files with 5 additions and 4 deletions

@ -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 { 
@ -27,7 +27,7 @@ namespace Yavsc.ViewModels.UserFiles
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();

@ -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; }
}
}
Loading…