Esempio n. 1
0
        public AppViewModel(LocalStorageRepository localStorageRepository)
        {
            if (localStorageRepository == null)
            {
                throw new ArgumentNullException(nameof(localStorageRepository));
            }

            LocalStorageRepository = localStorageRepository;
            FileSystemRepository   = new FileSystemRepository(localStorageRepository);
            FavoriteRepository     = new FavoriteRepository(localStorageRepository);
            ConfigRepository       = new ConfigRepository(localStorageRepository);

            InputStreamItem = new WorkspaceItemModel(FileSystemRepository.InputStream.Key, WorkspaceItemKindEnum.InputStream, FileSystemRepository.InputStream.Name);

            CommandExecutionModel = new CommandExecutionModel(
                FileSystemRepository,
                getSourceKey: () => Selected,
                addCommandToHistory: AddCommandToHistory,
                getEnvironmentalConfig: GetEnvironmentalConfig,
                saveTextEditorContent: SaveTextEditorContent
                );
        }
Esempio n. 2
0
 public bool IsWorkspaceItemSelected(WorkspaceItemModel workspaceItemModel)
 {
     return(workspaceItemModel.Key == Selected);
 }