Ejemplo n.º 1
0
 public VsSolutionUpdatesProjectSnapshotChangeTrigger(
     [Import(typeof(SVsServiceProvider))] IServiceProvider services,
     TextBufferProjectService projectService)
 {
     _services       = services;
     _projectService = projectService;
 }
        public DefaultVisualStudioWorkspaceAccessor(
            IBufferGraphFactoryService bufferGraphService,
            TextBufferProjectService projectService,
            [Import(typeof(VisualStudioWorkspace))] Workspace defaultWorkspace,
            [Import(typeof(LiveShareWorkspaceProvider), AllowDefault = true)] LiveShareWorkspaceProvider liveShareWorkspaceProvider)
        {
            if (bufferGraphService == null)
            {
                throw new ArgumentNullException(nameof(bufferGraphService));
            }

            if (projectService == null)
            {
                throw new ArgumentNullException(nameof(projectService));
            }

            if (defaultWorkspace == null)
            {
                throw new ArgumentNullException(nameof(defaultWorkspace));
            }

            _bufferGraphService         = bufferGraphService;
            _projectService             = projectService;
            _defaultWorkspace           = defaultWorkspace;
            _liveShareWorkspaceProvider = liveShareWorkspaceProvider;
        }
Ejemplo n.º 3
0
 // Internal for testing
 internal VsSolutionUpdatesProjectSnapshotChangeTrigger(
     IServiceProvider services,
     TextBufferProjectService projectService)
 {
     _services       = services;
     _projectService = projectService;
 }
        public VsSolutionUpdatesProjectSnapshotChangeTrigger(
            [Import(typeof(SVsServiceProvider))] IServiceProvider services,
            TextBufferProjectService projectService)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            if (projectService == null)
            {
                throw new ArgumentNullException(nameof(projectService));
            }

            _services       = services;
            _projectService = projectService;
        }
        public VisualStudioMacLSPEditorFeatureDetector(
            AggregateProjectCapabilityResolver projectCapabilityResolver,
            TextBufferProjectService textBufferProjectService)
        {
            _projectCapabilityResolver = projectCapabilityResolver;
            _textBufferProjectService  = textBufferProjectService;

            _useLegacyEditor = new Lazy <bool>(() =>
            {
                // TODO: Pull from preview features collection

                if (FeatureSwitchService.IsFeatureEnabled(RazorLSPEditorFeatureFlag) == true)
                {
                    return(false);
                }

                return(true);
            });
        }
Ejemplo n.º 6
0
        public VsSolutionUpdatesProjectSnapshotChangeTrigger(
            [Import(typeof(SVsServiceProvider))] IServiceProvider services,
            VisualStudioWorkspaceAccessor workspaceAccessor)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            if (workspaceAccessor == null)
            {
                throw new ArgumentNullException(nameof(workspaceAccessor));
            }

            _services = services;

            var languageServices = workspaceAccessor.Workspace.Services.GetLanguageServices(RazorLanguage.Name);

            _projectService = languageServices.GetRequiredService <TextBufferProjectService>();
        }
        public VsSolutionUpdatesProjectSnapshotChangeTrigger(
            [Import(typeof(SVsServiceProvider))] IServiceProvider services,
            TextBufferProjectService projectService,
            ProjectWorkspaceStateGenerator workspaceStateGenerator,
            ProjectSnapshotManagerDispatcher projectSnapshotManagerDispatcher,
            JoinableTaskContext joinableTaskContext)
        {
            if (services is null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            if (projectService is null)
            {
                throw new ArgumentNullException(nameof(projectService));
            }

            if (workspaceStateGenerator is null)
            {
                throw new ArgumentNullException(nameof(workspaceStateGenerator));
            }

            if (projectSnapshotManagerDispatcher is null)
            {
                throw new ArgumentNullException(nameof(projectSnapshotManagerDispatcher));
            }

            if (joinableTaskContext is null)
            {
                throw new ArgumentNullException(nameof(joinableTaskContext));
            }

            _services                              = services;
            _projectService                        = projectService;
            _workspaceStateGenerator               = workspaceStateGenerator;
            _projectSnapshotManagerDispatcher      = projectSnapshotManagerDispatcher;
            _joinableTaskContext                   = joinableTaskContext;
            _activeSolutionCancellationTokenSource = new CancellationTokenSource();
        }
        public DefaultVisualStudioWorkspaceAccessor(
            IBufferGraphFactoryService bufferGraphService,
            TextBufferProjectService projectService,
            [Import(typeof(VisualStudioWorkspace))] Workspace defaultWorkspace)
        {
            if (bufferGraphService is null)
            {
                throw new ArgumentNullException(nameof(bufferGraphService));
            }

            if (projectService is null)
            {
                throw new ArgumentNullException(nameof(projectService));
            }

            if (defaultWorkspace is null)
            {
                throw new ArgumentNullException(nameof(defaultWorkspace));
            }

            _bufferGraphService = bufferGraphService;
            _projectService     = projectService;
            _defaultWorkspace   = defaultWorkspace;
        }