/// <summary> /// Retrieves the project-level <see cref="IPropertyPagesCatalog"/> for a <see cref="ConfiguredProject"/>. /// </summary> public static async Task <IPropertyPagesCatalog?> GetProjectLevelPropertyPagesCatalogAsync(this ConfiguredProject project) { if (project.Services.PropertyPagesCatalog is IPropertyPagesCatalogProvider catalogProvider) { return(await catalogProvider.GetCatalogAsync(PropertyPageContexts.Project)); } return(null); }
public SLangDebuggerLaunchProvider(ConfiguredProject configuredProject) : base(configuredProject) { }
/// <summary> /// Initializes a new instance of the <see cref="RuleProperties"/> class. /// </summary> public RuleProperties(ConfiguredProject configuredProject, UnconfiguredProject unconfiguredProject) : base(configuredProject, unconfiguredProject) { }
public static MSBuildProjectXmlService GetProjectXmlService(this ConfiguredProject confproj) { return(confproj.GetServiceFeature <MSBuildProjectXmlService>()); }
public Task<IReadOnlyCollection<string>> AddTemporaryFiles(ConfiguredProject configuredProject, IEnumerable<string> filesToAdd) { return AddTemporaryItems(configuredProject, "Content", filesToAdd); }
public ProjectProperties(ConfiguredProject configuredProject) : base(configuredProject) { }
private static ApplyChangesToWorkspaceContext CreateInitializedInstance(out IWorkspaceProjectContext context, ConfiguredProject project = null, ICommandLineParserService commandLineParser = null, IProjectLogger logger = null, params IWorkspaceContextHandler[] handlers) { var applyChangesToWorkspace = CreateInstance(project, commandLineParser, logger, handlers); context = IWorkspaceProjectContextMockFactory.Create(); applyChangesToWorkspace.Initialize(context); return(applyChangesToWorkspace); }
public CopyRemoteItemPathCommand(ConfiguredProject configuredProject, IRInteractiveWorkflowProvider interactiveWorkflowProvider, ICoreShell coreShell) { _configuredProject = configuredProject; _interactiveWorkflowProvider = interactiveWorkflowProvider; _coreShell = coreShell; }
public SharedProjectReferencesProviderContext(ConfiguredProject configuredProject) : base(configuredProject) { }
private static ApplyChangesToWorkspaceContext CreateInitializedInstance(ConfiguredProject project = null, ICommandLineParserService commandLineParser = null, IProjectLogger logger = null, params IWorkspaceContextHandler[] handlers) { return(CreateInitializedInstance(out _, project, commandLineParser, logger, handlers)); }
public VS97AddItemCommandHandler(ConfiguredProject configuredProject, IAddItemDialogService addItemDialogService, IVsUIService <SVsShell, IVsShell> vsShell) : base(configuredProject, addItemDialogService, vsShell) { }
protected MyConfiguredProjectExports(ConfiguredProject configuredProject) : base(configuredProject) { }
public async Task <IRule?> GetBrowseObjectRuleAsync(IDependency dependency, IProjectCatalogSnapshot?catalogs) { Requires.NotNull(dependency, nameof(dependency)); IImmutableDictionary <string, IPropertyPagesCatalog> namedCatalogs = await GetNamedCatalogsAsync(); Requires.NotNull(namedCatalogs, nameof(namedCatalogs)); if (!namedCatalogs.TryGetValue(PropertyPageContexts.BrowseObject, out IPropertyPagesCatalog browseObjectsCatalog)) { // Issue https://github.com/dotnet/project-system/issues/4860 suggests this code path // can exist, however a repro was not found to dig deeper into the underlying cause. // For now just return null as the upstream caller handles null correctly anyway. return(null); } Rule schema = browseObjectsCatalog.GetSchema(dependency.SchemaName); string itemSpec = string.IsNullOrEmpty(dependency.OriginalItemSpec) ? dependency.Path : dependency.OriginalItemSpec; var context = ProjectPropertiesContext.GetContext(UnconfiguredProject, itemType: dependency.SchemaItemType, itemName: itemSpec); if (schema == null) { // Since we have no browse object, we still need to create *something* so // that standard property pages can pop up. Rule emptyRule = RuleExtensions.SynthesizeEmptyRule(context.ItemType); return(GetConfiguredProjectExports().PropertyPagesDataModelProvider.GetRule( emptyRule, context.File, context.ItemType, context.ItemName)); } if (dependency.Resolved) { return(GetConfiguredProjectExports().RuleFactory.CreateResolvedReferencePageRule( schema, context, dependency.Name, dependency.Properties)); } return(browseObjectsCatalog.BindToContext(schema.Name, context)); async Task <IImmutableDictionary <string, IPropertyPagesCatalog> > GetNamedCatalogsAsync() { if (catalogs != null) { return(catalogs.NamedCatalogs); } if (_namedCatalogs == null) { // Note: it is unlikely that we end up here, however for cases when node providers // getting their node data not from Design time build events, we might have OnDependenciesChanged // event coming before initial design time build event updates NamedCatalogs in this class. // Thus, just in case, explicitly request it here (GetCatalogsAsync will acquire a project read lock) _namedCatalogs = await ActiveConfiguredProject.Services .PropertyPagesCatalog .GetCatalogsAsync(); } return(_namedCatalogs); } ConfiguredProjectExports GetConfiguredProjectExports() { ConfiguredProject project = dependency.TargetFramework.Equals(TargetFramework.Any) ? ActiveConfiguredProject : _dependenciesHost.GetConfiguredProject(dependency.TargetFramework) ?? ActiveConfiguredProject; return(GetActiveConfiguredProjectExports(project)); } }
public SourceFilesCommand(ConfiguredProject configuredProject, IRInteractiveWorkflowProvider interactiveWorkflowProvider, IApplicationShell appShell) : base(interactiveWorkflowProvider, appShell, new FileSystem()) { _configuredProject = configuredProject; _interactiveWorkflowProvider = interactiveWorkflowProvider; _appShell = appShell; }
public DebuggerLaunchProviders(ConfiguredProject project) { Debuggers = new OrderPrecedenceImportCollection <IDebugLaunchProvider>(projectCapabilityCheckProvider: project); }
private async Task PopulateDatabaseConnectionsListAsync(ConfiguredProject project) { var connections = await GetDatabaseConnectionsAsync(project); var index = -1; _targetConnections = connections; if (!string.IsNullOrEmpty(Settings.TargetDatabaseConnection)) { var indices = _targetConnections.IndexWhere(c => c.ConnectionString.EqualsIgnoreCase(Settings.TargetDatabaseConnection)); index = indices.DefaultIfEmpty(-1).First(); } Targets = _targetConnections.Select(c => c.Name).ToList(); _selectedTargetIndex = index >= 0 ? index : 0; UpdateState(); }
public Task <TResult> OpenProjectForReadAsync <TResult>(ConfiguredProject project, Func <Project, TResult> action, CancellationToken cancellationToken = default(CancellationToken)) { var result = action(_evaluationProject); return(Task.FromResult(result)); }
public RProjectSourceItemProviderExtension(UnconfiguredProject unconfiguredProject, ConfiguredProject configuredProject, IProjectLockService projectLockService, IFileSystemMirroringProjectTemporaryItems temporaryItems) : base(unconfiguredProject, configuredProject, projectLockService, temporaryItems) { }
public Task OpenProjectForWriteAsync(ConfiguredProject project, Action <Project> action, CancellationToken cancellationToken = default(CancellationToken)) { action(_evaluationProject); return(Task.CompletedTask); }
private async Task<IReadOnlyCollection<string>> AddTemporaryItems(ConfiguredProject configuredProject, string itemType, IEnumerable<string> itemPathsToAdd) { var unhandled = new List<string>(); var relativePathToAdd = new List<string>(); foreach (var path in itemPathsToAdd) { if (PathHelper.IsOutsideProjectDirectory(_projectDirectory, _unconfiguredProject.MakeRooted(path))) { unhandled.Add(path); } else { relativePathToAdd.Add(_unconfiguredProject.MakeRelative(path)); } } if (relativePathToAdd.Count == 0) { return unhandled.AsReadOnly(); } using (var access = await _projectLockService.WriteLockAsync(_unloadCancellationToken)) { await access.CheckoutAsync(_inMemoryImportFullPath); foreach (var path in relativePathToAdd) { _temporaryAddedItemGroup.AddItem(itemType, path, Enumerable.Empty<KeyValuePair<string, string>>()); } var project = await access.GetProjectAsync(configuredProject, _unloadCancellationToken); project.ReevaluateIfNecessary(); } return unhandled.AsReadOnly(); }
public MoveUpCommand(IPhysicalProjectTree projectTree, SVsServiceProvider serviceProvider, ConfiguredProject configuredProject, IProjectAccessor accessor) : base(projectTree, serviceProvider, configuredProject, accessor) { }
/// <summary> /// Initializes a new instance of the <see cref="RuleProperties"/> class. /// </summary> public RuleProperties(ConfiguredProject configuredProject, string file, string itemType, string itemName) : base(configuredProject, file, itemType, itemName) { }
internal TargetFrameworkGlobalBuildPropertyProvider(IProjectService projectService, ConfiguredProject configuredProject) : base(projectService.Services) { _configuredProject = configuredProject; }
/// <summary> /// Creates a new instance of the configured project exports class. /// </summary> protected override ConfiguredProjectExports GetActiveConfiguredProjectExports(ConfiguredProject newActiveConfiguredProject) { Requires.NotNull(newActiveConfiguredProject, nameof(newActiveConfiguredProject)); return(GetActiveConfiguredProjectExports <MyConfiguredProjectExports>(newActiveConfiguredProject)); }
public ReferenceManagerCommandHandler(ConfiguredProject project, IReferencesUI referencesUI) { _referencesUI = referencesUI; ReferenceManagerUsers = new VsReferenceManagerUserImportCollection(projectCapabilityCheckProvider: project); }
public static IProjectPropertiesProvider GetUserPropertiesProvider(this ConfiguredProject project) { return(GetFeature <IProjectPropertiesProvider>(project, "Name", "UserFile")); }
/// <summary> /// Initializes a new instance of the <see cref="ProjectProperties"/> class. /// </summary> public ProjectProperties(ConfiguredProject configuredProject, string file, string itemType, string itemName) : base(configuredProject, file, itemType, itemName) { }
public CommandLineNotificationHandler(ConfiguredProject project) { CommandLineNotifications = new OrderPrecedenceImportCollection <Action <string, BuildOptions, BuildOptions> >(projectCapabilityCheckProvider: project); }
/// <summary> /// Initializes a new instance of the <see cref="ProjectProperties"/> class. /// </summary> public ProjectProperties(ConfiguredProject configuredProject, IProjectPropertiesContext projectPropertiesContext) : base(configuredProject, projectPropertiesContext) { }
public RDebugLaunchProvider(ConfiguredProject configuredProject, IRInteractiveWorkflowProvider interactiveWorkflowProvider, IProjectSystemServices pss) : base(configuredProject) { _properties = configuredProject.Services.ExportProvider.GetExportedValue<ProjectProperties>(); _interactiveWorkflow = interactiveWorkflowProvider.GetOrCreate(); _pss = pss; }
/// <summary> /// Initializes a new instance of the <see cref="ProjectProperties"/> class. /// </summary> public ProjectProperties(ConfiguredProject configuredProject, UnconfiguredProject unconfiguredProject) : base(configuredProject, unconfiguredProject) { }
/// <summary> /// Initializes a new instance of the <see cref="ProjectProperties"/> class. /// </summary> public NuProjProjectProperties(ConfiguredProject configuredProject, UnconfiguredProject unconfiguredProject) : base(configuredProject, unconfiguredProject) { }
public AdditionalDesignTimeBuildInputDataSource(ConfiguredProject project, IProjectSubscriptionService projectSubscriptionService) : base(project, projectSubscriptionService) { }
private async Task<IReadOnlyList<DbConnectionData>> GetDatabaseConnectionsAsync(ConfiguredProject project) { _noDbConnections = false; var connections = new List<DbConnectionData>(); if (project != null) { var result = await project.GetDatabaseConnections(_pcsp); foreach (var s in result) { connections.Add(new DbConnectionData { Name = s.Name, ConnectionString = s.Value }); } } if (connections.Count == 0) { connections.Add(new DbConnectionData { Name = Resources.SqlPublishDialog_NoDatabaseConnections }); _noDbConnections = true; } return connections; }
public SupportedTargetFrameworksEnumProvider(IProjectAccessor projectAccessor, ConfiguredProject configuredProject) { _projectAccessor = projectAccessor; _configuredProject = configuredProject; }
protected FileSystemMirroringProjectSourceItemProviderExtensionBase(UnconfiguredProject unconfiguredProject, ConfiguredProject configuredProject, IProjectLockService projectLockService, IFileSystemMirroringProjectTemporaryItems temporaryItems) { _unconfiguredProject = unconfiguredProject; _configuredProject = configuredProject; _projectLockService = projectLockService; _temporaryItems = temporaryItems; }
public SupportedTargetFrameworksEnumValuesGenerator(IProjectAccessor projectAccessor, ConfiguredProject configuredProject) { _projectAccessor = projectAccessor; _configuredProject = configuredProject; }
public LuaDebugger(ConfiguredProject configuredProject) : base(configuredProject) { }
protected abstract Task OnAddedNodesAsync(ConfiguredProject configuredProject, IEnumerable <IProjectTree> addedNodes, IProjectTree target);
public Task<IReadOnlyCollection<string>> AddTemporaryDirectories(ConfiguredProject configuredProject, IEnumerable<string> directoriesToAdd) { return AddTemporaryItems(configuredProject, "Folder", directoriesToAdd); }
internal AbstractMoveCommand CreateAbstractInstance(IPhysicalProjectTree projectTree = null, Shell.SVsServiceProvider serviceProvider = null, ConfiguredProject configuredProject = null) { projectTree = projectTree ?? IPhysicalProjectTreeFactory.Create(); serviceProvider = serviceProvider ?? SVsServiceProviderFactory.Create(); configuredProject = configuredProject ?? ConfiguredProjectFactory.Create(); return(CreateInstance(projectTree, serviceProvider, configuredProject)); }
public ProjectProperties(ConfiguredProject configuredProject) : base(configuredProject) { _fileSystem = new FileSystem(); }
internal abstract AbstractMoveCommand CreateInstance(IPhysicalProjectTree projectTree, Shell.SVsServiceProvider serviceProvider, ConfiguredProject configuredProject);
public XSharpDebuggerLaunchProvider(ConfiguredProject configuredProject) : base(configuredProject) { }
public SupportedTargetFrameworksEnumProvider( ConfiguredProject project, IProjectSubscriptionService subscriptionService) : base(project, subscriptionService) { }
/// <summary> /// Initializes a new instance of the <see cref="RuleProperties"/> class. /// </summary> public RuleProperties(ConfiguredProject configuredProject, IProjectPropertiesContext projectPropertiesContext) : base(configuredProject, projectPropertiesContext) { }
[ImportingConstructor] // NOTE: Took me two days to realise this line was missing. Launcher won't work otherwise. public DebugLauncher (ConfiguredProject configuredProject) : base (configuredProject) { }
public PackageRestoreConfiguredInput(ConfiguredProject project, IVsProjectRestoreInfo2 restoreInfo) { Project = project; RestoreInfo = restoreInfo; }