Ejemplo n.º 1
0
 public static AppFileEntryDto MapToAppFileDto(AppFileEntry src)
 {
     return(new()
     {
         Id = src.Id,
         ParentId = src.ParentId,
         Name = src.Name,
         IsDirectory = src.IsDirectory
     });
 }
Ejemplo n.º 2
0
        public static AppFileEntryChange MapToAppFileEntryChange(FileSystemEntryChange fileChange, int id, int parentId)
        {
            var isDirectory = PathHelper
                              .IsDirectoryPath(fileChange.Path);

            var appFileEntry = new AppFileEntry(id, parentId,
                                                fileChange.Name, isDirectory);

            var appFileChangeType = MapToAppFileEntryChangeType(fileChange.ChangeType);

            var content = GetContent(fileChange, isDirectory);

            var appFileChange = new AppFileEntryChange(appFileEntry,
                                                       appFileChangeType, content);

            return(appFileChange);
        }
Ejemplo n.º 3
0
 public AppFileEntryChange(AppFileEntry appFileEntry, AppFileEntryChangeType changeType, string content = null)
 {
     AppFileEntry = appFileEntry;
     ChangeType   = changeType;
     Content      = content;
 }