public FileListingModel(IFileChooserModel model, IFileListing file, Action selected, bool useIsSelected) { _model = model; _selectedAction = selected; UseIsSelected = useIsSelected; if (file != null) { Name = file.Name; FullName = file.FullName; if (file.Children != null && file.Children.Count > 0) { Children = new AsyncObservableCollection <IFileListingModel>( file.Children.Select(input => new FileListingModel(_model, input, selected, useIsSelected))); } IsDirectory = file.IsDirectory; IsExpanderVisible = IsDirectory; IsVisible = true; _file = file; } }
public DllListingModel(IManagePluginSourceModel updateManager, IFileListing dllListing) { _updateManager = updateManager; if (dllListing != null) { Name = dllListing.Name; FullName = dllListing.FullName; if (dllListing.Children != null && dllListing.Children.Count > 0) { Children = new AsyncObservableCollection <IDllListingModel>( dllListing.Children.Select(input => new DllListingModel(_updateManager, input))); } IsDirectory = dllListing.IsDirectory; IsExpanderVisible = IsDirectory; IsVisible = true; _dllListing = dllListing; } _isCom = false; }