Пример #1
0
        private async void InitializeWorkspace()
        {
            var ctrl = await _shell.Window.ShowProgressAsync("Setting up workspace", "Restoring packages");

            ctrl.SetIndeterminate();

            var runtime = Kvm.GetRuntime(_shell.SelectedRuntime);
            await _host.RestorePackages(runtime, _dir.FullName);

            ctrl.SetMessage("Setting up projects");
            _connect = new TaskCompletionSource <bool>();
            _host.Start(runtime);
            await _connect.Task;

            _connect = null;
            await ctrl.CloseAsync();
        }
Пример #2
0
        public WorkspaceViewModel(ShellViewModel shell, string path)
            : base(null, path)
        {
            var runtime = Kvm.GetRuntime(shell.SelectedRuntime);

            _host                 = new Host(path);
            _host.Connected      += HostConnected;
            _host.Configurations += HostConfigurations;
            _host.References     += HostReferences;
            _host.Start(runtime);

            _watcher = new FileSystemWatcher(path);
            _watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.Size | NotifyFilters.DirectoryName | NotifyFilters.LastAccess;
            _watcher.Filter       = "*.*";
            _watcher.Changed     += FileChanged;

            _workspace = new CustomWorkspace();
        }