Esempio n. 1
0
        public void Initialize(DirectoryViewModel directoryViewModel)
        {
            var properties = GeneralPropertyViewModel.CreatDirectoryProperties(directoryViewModel).ToList();

            GeneralProperties = CreateGeneralProperties(properties);
            Entry             = directoryViewModel;
        }
Esempio n. 2
0
        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();
            }
        }