public DependencySubscriptionsHost( IUnconfiguredProjectCommonServices commonServices, Lazy <IAggregateCrossTargetProjectContextProvider> contextProvider, [Import(ExportContractNames.Scopes.UnconfiguredProject)] IProjectAsynchronousTasksService tasksService, IActiveConfiguredProjectSubscriptionService activeConfiguredProjectSubscriptionService, IActiveProjectConfigurationRefreshService activeProjectConfigurationRefreshService, ITargetFrameworkProvider targetFrameworkProvider, IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) : base(commonServices, contextProvider, tasksService, activeConfiguredProjectSubscriptionService, activeProjectConfigurationRefreshService) { CommonServices = commonServices; DependencySubscribers = new OrderPrecedenceImportCollection <IDependencyCrossTargetSubscriber>( projectCapabilityCheckProvider: commonServices.Project); SnapshotFilters = new OrderPrecedenceImportCollection <IDependenciesSnapshotFilter>( projectCapabilityCheckProvider: commonServices.Project, orderingStyle: ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast); SubTreeProviders = new OrderPrecedenceImportCollection <IProjectDependenciesSubTreeProvider>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast, projectCapabilityCheckProvider: commonServices.Project); DependenciesUpdateScheduler = new TaskDelayScheduler( _dependenciesUpdateThrottleInterval, commonServices.ThreadingService, tasksService.UnloadCancellationToken); TargetFrameworkProvider = targetFrameworkProvider; AggregateSnapshotProvider = aggregateSnapshotProvider; ProjectFilePath = CommonServices.Project.FullPath; }
public DependenciesGraphProvider(IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider, SVsServiceProvider serviceProvider) : this(aggregateSnapshotProvider, serviceProvider, new JoinableTaskContextNode(ThreadHelper.JoinableTaskContext)) { }
protected GraphActionHandlerBase(IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) { AggregateSnapshotProvider = aggregateSnapshotProvider; _viewProviders = new OrderPrecedenceImportCollection <IDependenciesGraphViewProvider>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesFirst); }
public SearchGraphActionHandler( IDependenciesGraphBuilder builder, IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) : base(aggregateSnapshotProvider) { _builder = builder; }
public ProjectRuleHandler( IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider, IDependenciesSnapshotProvider snapshotProvider, IUnconfiguredProjectCommonServices commonServices) : base(ProjectReference.SchemaName, ResolvedProjectReference.SchemaName) { aggregateSnapshotProvider.SnapshotChanged += OnAggregateSnapshotChanged; aggregateSnapshotProvider.SnapshotProviderUnloading += OnAggregateSnapshotProviderUnloading; // Unregister event handlers when the project unloads commonServices.Project.ProjectUnloading += OnUnconfiguredProjectUnloading; return; Task OnUnconfiguredProjectUnloading(object sender, EventArgs e) { commonServices.Project.ProjectUnloading -= OnUnconfiguredProjectUnloading; aggregateSnapshotProvider.SnapshotChanged -= OnAggregateSnapshotChanged; aggregateSnapshotProvider.SnapshotProviderUnloading -= OnAggregateSnapshotProviderUnloading; return(Task.CompletedTask); } void OnAggregateSnapshotChanged(object sender, SnapshotChangedEventArgs e) { OnOtherProjectDependenciesChanged(snapshotProvider.CurrentSnapshot, e.Snapshot, shouldBeResolved: true, e.Token); } void OnAggregateSnapshotProviderUnloading(object sender, SnapshotProviderUnloadingEventArgs e) { OnOtherProjectDependenciesChanged(snapshotProvider.CurrentSnapshot, e.SnapshotProvider.CurrentSnapshot, shouldBeResolved: false, e.Token); } }
public UnsupportedProjectsSnapshotFilter( IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider, ITargetFrameworkProvider targetFrameworkProvider) { AggregateSnapshotProvider = aggregateSnapshotProvider; TargetFrameworkProvider = targetFrameworkProvider; }
public DependenciesSnapshotProvider( IUnconfiguredProjectCommonServices commonServices, Lazy <AggregateCrossTargetProjectContextProvider> contextProvider, IUnconfiguredProjectTasksService tasksService, IActiveConfiguredProjectSubscriptionService activeConfiguredProjectSubscriptionService, IActiveProjectConfigurationRefreshService activeProjectConfigurationRefreshService, ITargetFrameworkProvider targetFrameworkProvider, IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) : base(commonServices.ThreadingService.JoinableTaskContext) { _commonServices = commonServices; _tasksService = tasksService; _activeConfiguredProjectSubscriptionService = activeConfiguredProjectSubscriptionService; _targetFrameworkProvider = targetFrameworkProvider; _aggregateSnapshotProvider = aggregateSnapshotProvider; _dependencySubscribers = new OrderPrecedenceImportCollection <IDependencyCrossTargetSubscriber>( projectCapabilityCheckProvider: commonServices.Project); _snapshotFilters = new OrderPrecedenceImportCollection <IDependenciesSnapshotFilter>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast, projectCapabilityCheckProvider: commonServices.Project); _subTreeProviders = new OrderPrecedenceImportCollection <IProjectDependenciesSubTreeProvider>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast, projectCapabilityCheckProvider: commonServices.Project); _context = new ContextTracker(targetFrameworkProvider, commonServices, contextProvider, activeProjectConfigurationRefreshService); _snapshot = new SnapshotUpdater(commonServices, tasksService.UnloadCancellationToken); _disposables = new DisposableBag { _snapshot, _contextUpdateGate }; }
public GraphActionHandlerBase(IDependenciesGraphBuilder builder, IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) { Builder = builder; AggregateSnapshotProvider = aggregateSnapshotProvider; ViewProviders = new OrderPrecedenceImportCollection <IDependenciesGraphViewProvider>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesFirst); }
public ProjectGraphViewProvider(IDependenciesGraphBuilder builder, IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider, ITargetFrameworkProvider targetFrameworkProvider) : base(builder) { AggregateSnapshotProvider = aggregateSnapshotProvider; TargetFrameworkProvider = targetFrameworkProvider; }
public DependenciesGraphChangeTracker(IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) { _aggregateSnapshotProvider = aggregateSnapshotProvider; _aggregateSnapshotProvider.SnapshotChanged += OnSnapshotChanged; _viewProviders = new OrderPrecedenceImportCollection <IDependenciesGraphViewProvider>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesFirst); }
public DependenciesGraphProvider(IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider, IAsyncServiceProvider serviceProvider, JoinableTaskContextNode joinableTaskContextNode) : base(joinableTaskContextNode) { AggregateSnapshotProvider = aggregateSnapshotProvider; ServiceProvider = serviceProvider; GraphActionHandlers = new OrderPrecedenceImportCollection <IDependenciesGraphActionHandler>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast); }
public DependenciesGraphProvider( IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider, [Import(typeof(SAsyncServiceProvider))] IAsyncServiceProvider serviceProvider, JoinableTaskContext joinableTaskContext) : base(new JoinableTaskContextNode(joinableTaskContext)) { _aggregateSnapshotProvider = aggregateSnapshotProvider; _serviceProvider = serviceProvider; _graphActionHandlers = new OrderPrecedenceImportCollection <IDependenciesGraphActionHandler>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast); }
public ProjectRuleHandler(IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider, IDependenciesSnapshotProvider snapshotProvider, IUnconfiguredProjectCommonServices commonServices) { AggregateSnapshotProvider = aggregateSnapshotProvider; SnapshotProvider = snapshotProvider; CommonServices = commonServices; AggregateSnapshotProvider.SnapshotChanged += OnSnapshotChanged; AggregateSnapshotProvider.SnapshotProviderUnloading += OnSnapshotProviderUnloading; CommonServices.Project.ProjectUnloading += OnUnconfiguredProjectUnloading; }
public DependenciesSnapshotProvider( IUnconfiguredProjectCommonServices commonServices, Lazy <IAggregateCrossTargetProjectContextProvider> contextProvider, IUnconfiguredProjectTasksService tasksService, IActiveConfiguredProjectSubscriptionService activeConfiguredProjectSubscriptionService, IActiveProjectConfigurationRefreshService activeProjectConfigurationRefreshService, ITargetFrameworkProvider targetFrameworkProvider, IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) : base(commonServices.ThreadingService.JoinableTaskContext) { Requires.NotNull(contextProvider, nameof(contextProvider)); Requires.NotNull(tasksService, nameof(tasksService)); Requires.NotNull(activeConfiguredProjectSubscriptionService, nameof(activeConfiguredProjectSubscriptionService)); Requires.NotNull(activeProjectConfigurationRefreshService, nameof(activeProjectConfigurationRefreshService)); Requires.NotNull(targetFrameworkProvider, nameof(targetFrameworkProvider)); Requires.NotNull(aggregateSnapshotProvider, nameof(aggregateSnapshotProvider)); _commonServices = commonServices; _contextProvider = contextProvider; _tasksService = tasksService; _activeConfiguredProjectSubscriptionService = activeConfiguredProjectSubscriptionService; _activeProjectConfigurationRefreshService = activeProjectConfigurationRefreshService; _targetFrameworkProvider = targetFrameworkProvider; _currentSnapshot = DependenciesSnapshot.CreateEmpty(_commonServices.Project.FullPath); _dependencySubscribers = new OrderPrecedenceImportCollection <IDependencyCrossTargetSubscriber>( projectCapabilityCheckProvider: commonServices.Project); _snapshotFilters = new OrderPrecedenceImportCollection <IDependenciesSnapshotFilter>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast, projectCapabilityCheckProvider: commonServices.Project); _subTreeProviders = new OrderPrecedenceImportCollection <IProjectDependenciesSubTreeProvider>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast, projectCapabilityCheckProvider: commonServices.Project); _dependenciesUpdateScheduler = new TaskDelayScheduler( _dependenciesUpdateThrottleInterval, commonServices.ThreadingService, tasksService.UnloadCancellationToken); _snapshotChangedSource = DataflowBlockSlim.CreateBroadcastBlock <SnapshotChangedEventArgs>("DependenciesSnapshot {1}", skipIntermediateInputData: true); aggregateSnapshotProvider.RegisterSnapshotProvider(this); }
public DependencySubscriptionsHost( IUnconfiguredProjectCommonServices commonServices, Lazy <IAggregateCrossTargetProjectContextProvider> contextProvider, [Import(ExportContractNames.Scopes.UnconfiguredProject)] IProjectAsynchronousTasksService tasksService, IActiveConfiguredProjectSubscriptionService activeConfiguredProjectSubscriptionService, IActiveProjectConfigurationRefreshService activeProjectConfigurationRefreshService, ITargetFrameworkProvider targetFrameworkProvider, IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) : base(commonServices.ThreadingService.JoinableTaskContext) { Requires.NotNull(contextProvider, nameof(contextProvider)); Requires.NotNull(tasksService, nameof(tasksService)); Requires.NotNull(activeConfiguredProjectSubscriptionService, nameof(activeConfiguredProjectSubscriptionService)); Requires.NotNull(activeProjectConfigurationRefreshService, nameof(activeProjectConfigurationRefreshService)); Requires.NotNull(targetFrameworkProvider, nameof(targetFrameworkProvider)); Requires.NotNull(aggregateSnapshotProvider, nameof(aggregateSnapshotProvider)); _commonServices = commonServices; _contextProvider = contextProvider; _tasksService = tasksService; _activeConfiguredProjectSubscriptionService = activeConfiguredProjectSubscriptionService; _activeProjectConfigurationRefreshService = activeProjectConfigurationRefreshService; _targetFrameworkProvider = targetFrameworkProvider; _aggregateSnapshotProvider = aggregateSnapshotProvider; _currentSnapshot = DependenciesSnapshot.CreateEmpty(_commonServices.Project.FullPath); _dependencySubscribers = new OrderPrecedenceImportCollection <IDependencyCrossTargetSubscriber>( projectCapabilityCheckProvider: commonServices.Project); _snapshotFilters = new OrderPrecedenceImportCollection <IDependenciesSnapshotFilter>( projectCapabilityCheckProvider: commonServices.Project, orderingStyle: ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast); _subTreeProviders = new OrderPrecedenceImportCollection <IProjectDependenciesSubTreeProvider>( ImportOrderPrecedenceComparer.PreferenceOrder.PreferredComesLast, projectCapabilityCheckProvider: commonServices.Project); _dependenciesUpdateScheduler = new TaskDelayScheduler( _dependenciesUpdateThrottleInterval, commonServices.ThreadingService, tasksService.UnloadCancellationToken); ProjectFilePath = commonServices.Project.FullPath; }
public ProjectRuleHandler( IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider, DependenciesSnapshotProvider snapshotProvider, IUnconfiguredProjectCommonServices commonServices, [Import(AllowDefault = true)] ISolutionService?solutionService) : base(ProjectReference.SchemaName, ResolvedProjectReference.SchemaName) { aggregateSnapshotProvider.SnapshotChanged += OnAggregateSnapshotChanged; aggregateSnapshotProvider.SnapshotProviderUnloading += OnAggregateSnapshotProviderUnloading; // Unregister event handlers when the project unloads commonServices.Project.ProjectUnloading += OnUnconfiguredProjectUnloading; return; Task OnUnconfiguredProjectUnloading(object sender, EventArgs e) { commonServices.Project.ProjectUnloading -= OnUnconfiguredProjectUnloading; aggregateSnapshotProvider.SnapshotChanged -= OnAggregateSnapshotChanged; aggregateSnapshotProvider.SnapshotProviderUnloading -= OnAggregateSnapshotProviderUnloading; return(Task.CompletedTask); } void OnAggregateSnapshotChanged(object sender, SnapshotChangedEventArgs e) { OnOtherProjectDependenciesChanged(snapshotProvider.CurrentSnapshot, e.Snapshot, shouldBeResolved: true, e.Token); } void OnAggregateSnapshotProviderUnloading(object sender, SnapshotProviderUnloadingEventArgs e) { // Only notify if the solution is not closing. // If it is closing, notifying would result in pointless updates. // If the solution service is unavailable, always update. if (solutionService?.IsSolutionClosing != true) { OnOtherProjectDependenciesChanged(snapshotProvider.CurrentSnapshot, e.SnapshotProvider.CurrentSnapshot, shouldBeResolved: false, e.Token); } } }
public GetChildrenGraphActionHandler(IDependenciesGraphBuilder builder, IAggregateDependenciesSnapshotProvider aggregateSnpahostProvider) : base(builder, aggregateSnpahostProvider) { }
public CheckChildrenGraphActionHandler( IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) : base(aggregateSnapshotProvider) { }
public UnsupportedProjectsSnapshotFilter(IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) { _aggregateSnapshotProvider = aggregateSnapshotProvider; }
public UnresolvedProjectReferenceSnapshotFilter(IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) { _aggregateSnapshotProvider = aggregateSnapshotProvider; }
public TrackChangesGraphActionHandler(IDependenciesGraphBuilder builder, IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) : base(builder, aggregateSnapshotProvider) { }
protected InputNodeGraphActionHandlerBase(IAggregateDependenciesSnapshotProvider aggregateSnapshotProvider) : base(aggregateSnapshotProvider) { }