public ImplicitProjectPropertiesProvider(
     [Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectPropertiesProvider provider,
     [Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectInstancePropertiesProvider instanceProvider,
     UnconfiguredProject unconfiguredProject)
     : base(provider, instanceProvider, unconfiguredProject)
 {
 }
 public ProjectFileInterceptedViaSnapshotProjectPropertiesProvider(
     [Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectPropertiesProvider provider,
     [Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectInstancePropertiesProvider instanceProvider,
     UnconfiguredProject project,
     [ImportMany(ContractNames.ProjectPropertyProviders.ProjectFile)] IEnumerable <Lazy <IInterceptingPropertyValueProvider, IInterceptingPropertyValueProviderMetadata> > interceptingValueProviders)
     : base(provider, instanceProvider, project, interceptingValueProviders)
 {
 }
 protected InterceptedProjectPropertiesProviderBase(
     IProjectPropertiesProvider provider,
     IProjectInstancePropertiesProvider instanceProvider,
     UnconfiguredProject project,
     IEnumerable <Lazy <IInterceptingPropertyValueProvider, IInterceptingPropertyValueProviderMetadata> > interceptingValueProviders)
     : base(provider, instanceProvider, project)
 {
     _interceptingValueProviders = interceptingValueProviders.ToImmutableArray();
 }
Beispiel #4
0
 public ImplicitProjectPropertiesProvider(
     [Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectPropertiesProvider provider,
     [Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectInstancePropertiesProvider instanceProvider,
     ImplicitProjectPropertiesStore <string, string> propertyStore,
     UnconfiguredProject unconfiguredProject)
     : base(provider, instanceProvider, unconfiguredProject)
 {
     _propertyStore = propertyStore;
 }
        public DynamicUnconfiguredPropertyManager(
            UnconfiguredProject unconfiguredProject,
            IProjectPropertiesProvider projectPropertiesProvider)
        {
            _unconfiguredProject     = unconfiguredProject ?? throw new ArgumentNullException(nameof(unconfiguredProject));
            _projectThreadingService = _unconfiguredProject.ProjectService.Services.ThreadingPolicy;

            _projectPropertiesProvider = projectPropertiesProvider;
        }
Beispiel #6
0
 public ImplicitProjectPropertiesProvider(
     [Import("Microsoft.VisualStudio.ProjectSystem.ProjectFile")] IProjectPropertiesProvider provider,
     [Import("Microsoft.VisualStudio.ProjectSystem.ProjectFile")] IProjectInstancePropertiesProvider instanceProvider,
     ImplicitProjectPropertiesStore <string, string> propertyStore,
     UnconfiguredProject unconfiguredProject)
     : base(provider, instanceProvider, unconfiguredProject)
 {
     _propertyStore = propertyStore;
 }
 public UserFileInterceptedProjectPropertiesProvider(
     [Import(ContractNames.ProjectPropertyProviders.UserFile)] IProjectPropertiesProvider provider,
     // We use project file here because in CPS, the UserFile instance provider is implemented by the same
     // provider as the ProjectFile, and is exported as the ProjectFile provider.
     [Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectInstancePropertiesProvider instanceProvider,
     UnconfiguredProject project,
     [ImportMany(ContractNames.ProjectPropertyProviders.UserFile)] IEnumerable <Lazy <IInterceptingPropertyValueProvider, IInterceptingPropertyValueProviderMetadata> > interceptingValueProviders)
     : base(provider, instanceProvider, project, interceptingValueProviders)
 {
 }
Beispiel #8
0
        /// <summary>
        /// Construct using the provider that should be delegated to for most operations
        /// </summary>
        public DelegatedProjectPropertiesProviderBase(IProjectPropertiesProvider provider, IProjectInstancePropertiesProvider instanceProvider, UnconfiguredProject project)
        {
            Requires.NotNull(provider, nameof(provider));
            Requires.NotNull(instanceProvider, nameof(instanceProvider));
            Requires.NotNull(project, nameof(project));

            DelegatedProvider         = provider;
            DelegatedInstanceProvider = instanceProvider;
            Project = project;
        }
 public GetProjectInformationCommand(ITransactionFactory transactionFactory,
                                     IExceptionHandler exceptionHandler,
                                     ExecutionContext executionContext,
                                     ICommandResultVisualizer commandResultVisualizer,
                                     IEntityFactory entityFactory, IProjectPropertiesProvider propertiesProvider)
     : base(transactionFactory, exceptionHandler, executionContext, commandResultVisualizer, true)
 {
     this.entityFactory      = entityFactory;
     this.propertiesProvider = propertiesProvider;
 }
        public static ConfiguredProjectServices Create(IPropertyPagesCatalogProvider propertyPagesCatalogProvider = null,
                                                       IAdditionalRuleDefinitionsService ruleService          = null,
                                                       IProjectSubscriptionService projectSubscriptionService = null,
                                                       IProjectPropertiesProvider projectPropertiesProvider   = null)
        {
            var mock = new Mock <ConfiguredProjectServices>();

            mock.Setup(c => c.PropertyPagesCatalog).Returns(propertyPagesCatalogProvider);
            mock.Setup(c => c.AdditionalRuleDefinitions).Returns(ruleService);
            mock.Setup(c => c.ProjectSubscription).Returns(projectSubscriptionService);
            mock.Setup(c => c.ProjectPropertiesProvider).Returns(projectPropertiesProvider);
            return(mock.Object);
        }
 public ProjectFileOrAssemblyInfoPropertiesProvider(
     [Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectPropertiesProvider delegatedProvider,
     [Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectInstancePropertiesProvider instanceProvider,
     [ImportMany(ContractNames.ProjectPropertyProviders.ProjectFile)] IEnumerable <Lazy <IInterceptingPropertyValueProvider, IInterceptingPropertyValueProviderMetadata> > interceptingValueProviders,
     UnconfiguredProject project,
     IActiveWorkspaceProjectContextHost projectContextHost,
     VisualStudioWorkspace workspace,
     IProjectThreadingService threadingService)
     : base(delegatedProvider, instanceProvider, interceptingValueProviders, project,
            getActiveProjectId: () => GetProjectId(threadingService, projectContextHost),
            workspace: workspace,
            threadingService: threadingService)
 {
 }
        protected AbstractProjectFileOrAssemblyInfoPropertiesProvider(
            IProjectPropertiesProvider delegatedProvider,
            IProjectInstancePropertiesProvider instanceProvider,
            IEnumerable <Lazy <IInterceptingPropertyValueProvider, IInterceptingPropertyValueProviderMetadata> > interceptingValueProviders,
            UnconfiguredProject project,
            Func <ProjectId?> getActiveProjectId,
            Workspace workspace,
            IProjectThreadingService threadingService)
            : base(delegatedProvider, instanceProvider, project)
        {
            Requires.NotNull(interceptingValueProviders, nameof(interceptingValueProviders));
            Requires.NotNull(getActiveProjectId, nameof(getActiveProjectId));
            Requires.NotNull(workspace, nameof(workspace));
            Requires.NotNull(threadingService, nameof(threadingService));

            _interceptingValueProviders = interceptingValueProviders.ToImmutableArray();
            _getActiveProjectId         = getActiveProjectId;
            _workspace        = workspace;
            _threadingService = threadingService;
        }
Beispiel #13
0
 public ProjectLocalSecretsManager(IProjectPropertiesProvider propertiesProvider, Lazy <IServiceProvider> serviceProvider)
 {
     _propertiesProvider = propertiesProvider ?? throw new ArgumentNullException(nameof(propertiesProvider));
     _services           = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
     _semaphore          = new AsyncSemaphore(1);
 }