Microsoft.VisualStudio.R.Package.ProjectSystem.PropertyPages.Settings.SettingsPageControl.SetProjectAsync C# (CSharp) Method

SetProjectAsync() public method

public SetProjectAsync ( UnconfiguredProject project, IRProjectProperties properties ) : Task
project UnconfiguredProject
properties IRProjectProperties
return Task
        public async Task SetProjectAsync(UnconfiguredProject project, IRProjectProperties properties) {
            if(_access != null) {
                throw new InvalidOperationException("Project is already set");
            }
            _access = await _settingsProvider.OpenProjectSettingsAccessAsync(project, properties);
            _viewModel = new SettingsPageViewModel(_access.Settings, _appShell, _fs);
            await _viewModel.SetProjectPathAsync(Path.GetDirectoryName(project.FullPath), properties);

            PopulateFilesCombo();
            LoadPropertyGrid();

            _access.Settings.CollectionChanged += OnSettingsCollectionChanged;
        }

Usage Example

Esempio n. 1
0
 protected override async Task OnSetObjects(bool isClosing)
 {
     if (!isClosing)
     {
         Debug.Assert(!string.IsNullOrEmpty(UnconfiguredProject.FullPath));
         await _control.SetProjectAsync(UnconfiguredProject, ConfiguredProperties[0]);
     }
     else
     {
         _control.Close();
     }
 }
All Usage Examples Of Microsoft.VisualStudio.R.Package.ProjectSystem.PropertyPages.Settings.SettingsPageControl::SetProjectAsync