Exemple #1
0
        public DotNetProjectHost Create(DotNetProject project)
        {
            if (project == null)
            {
                throw new ArgumentNullException(nameof(project));
            }

            var projectHost = new DefaultDotNetProjectHost(project, _projectSnapshotManagerDispatcher, _workspaceAccessor, _projectService);

            return(projectHost);
        }
        public DotNetProjectHost Create(DotNetProject project)
        {
            if (project is null)
            {
                throw new ArgumentNullException(nameof(project));
            }

            var projectHost = new DefaultDotNetProjectHost(project, _projectSnapshotManagerDispatcher, _workspaceAccessor, _projectService, _projectConfigurationFilePathStore, _languageServerFeatureOptions);

            return(projectHost);
        }
Exemple #3
0
        public void UpdateRazorHostProject_UnsupportedProjectNoops()
        {
            // Arrange
            var projectService = new Mock <TextBufferProjectService>();

            projectService.Setup(p => p.IsSupportedProject(It.IsAny <object>()))
            .Returns(false);
            var dotNetProjectHost = new DefaultDotNetProjectHost(
                Dispatcher,
                Mock.Of <VisualStudioMacWorkspaceAccessor>(),
                projectService.Object);

            // Act & Assert
            dotNetProjectHost.UpdateRazorHostProject();
        }
Exemple #4
0
        public void UpdateRazorHostProject_UnsupportedProjectNoops()
        {
            // Arrange
            var projectService = new Mock <TextBufferProjectService>(MockBehavior.Strict);

            projectService.Setup(p => p.IsSupportedProject(It.IsAny <object>()))
            .Returns(false);
            var dotNetProjectHost = new DefaultDotNetProjectHost(
                Dispatcher,
                Mock.Of <VisualStudioMacWorkspaceAccessor>(MockBehavior.Strict),
                projectService.Object,
                TestProjectConfigurationFilePathStore.Instance,
                TestVSLanguageServerFeatureOptions.Instance);

            // Act & Assert
            dotNetProjectHost.UpdateRazorHostProject();
        }