public void Initialize(DirectoryViewModel directoryViewModel) { var properties = GeneralPropertyViewModel.CreatDirectoryProperties(directoryViewModel).ToList(); GeneralProperties = CreateGeneralProperties(properties); Entry = directoryViewModel; }
public void Initialize(FileViewModel fileViewModel, FilePropertiesDto dto, ITargetedRestClient restClient) { var properties = GeneralPropertyViewModel.CreateFileProperties(fileViewModel, dto).ToList(); GeneralProperties = CreateGeneralProperties(properties); Entry = fileViewModel; DetailsViewModel = new DetailsPropertyViewModel(dto.Properties); if (!Entry.IsDirectory) { HashViewModels = Enum.GetValues(typeof(FileHashAlgorithm)).Cast <FileHashAlgorithm>() .Select(x => new ComputeHashViewModel(Entry.Source.Path, x, restClient)).ToList(); } }