public PsesCompletionHandler(
     ILoggerFactory factory,
     IRunspaceContext runspaceContext,
     IInternalPowerShellExecutionService executionService,
     WorkspaceService workspaceService)
 {
     _logger           = factory.CreateLogger <PsesCompletionHandler>();
     _runspaceContext  = runspaceContext;
     _executionService = executionService;
     _workspaceService = workspaceService;
 }
 public BreakpointHandlers(
     ILoggerFactory loggerFactory,
     DebugService debugService,
     DebugStateService debugStateService,
     WorkspaceService workspaceService,
     IRunspaceContext runspaceContext)
 {
     _logger            = loggerFactory.CreateLogger <BreakpointHandlers>();
     _debugService      = debugService;
     _debugStateService = debugStateService;
     _workspaceService  = workspaceService;
     _runspaceContext   = runspaceContext;
 }
 public GetVersionHandler(
     ILoggerFactory factory,
     IRunspaceContext runspaceContext,
     IInternalPowerShellExecutionService executionService,
     ILanguageServerFacade languageServer,
     ConfigurationService configurationService)
 {
     _logger               = factory.CreateLogger <GetVersionHandler>();
     _runspaceContext      = runspaceContext;
     _executionService     = executionService;
     _languageServer       = languageServer;
     _configurationService = configurationService;
 }
示例#4
0
 public DisconnectHandler(
     ILoggerFactory factory,
     PsesDebugServer psesDebugServer,
     IRunspaceContext runspaceContext,
     IInternalPowerShellExecutionService executionService,
     DebugService debugService,
     DebugStateService debugStateService,
     DebugEventHandlerService debugEventHandlerService)
 {
     _logger                   = factory.CreateLogger <DisconnectHandler>();
     _psesDebugServer          = psesDebugServer;
     _runspaceContext          = runspaceContext;
     _executionService         = executionService;
     _debugService             = debugService;
     _debugStateService        = debugStateService;
     _debugEventHandlerService = debugEventHandlerService;
 }
示例#5
0
        /// <summary>
        /// Constructs an instance of the SymbolsService class and uses
        /// the given Runspace to execute language service operations.
        /// </summary>
        /// <param name="factory">An ILoggerFactory implementation used for writing log messages.</param>
        /// <param name="runspaceContext"></param>
        /// <param name="executionService"></param>
        /// <param name="workspaceService"></param>
        /// <param name="configurationService"></param>
        public SymbolsService(
            ILoggerFactory factory,
            IRunspaceContext runspaceContext,
            IInternalPowerShellExecutionService executionService,
            WorkspaceService workspaceService,
            ConfigurationService configurationService)
        {
            _logger           = factory.CreateLogger <SymbolsService>();
            _runspaceContext  = runspaceContext;
            _executionService = executionService;
            _workspaceService = workspaceService;

            _codeLensProviders = new ConcurrentDictionary <string, ICodeLensProvider>();
            ICodeLensProvider[] codeLensProviders = new ICodeLensProvider[]
            {
                new ReferencesCodeLensProvider(_workspaceService, this),
                new PesterCodeLensProvider(configurationService)
            };

            foreach (ICodeLensProvider codeLensProvider in codeLensProviders)
            {
                _codeLensProviders.TryAdd(codeLensProvider.ProviderId, codeLensProvider);
            }

            _documentSymbolProviders = new ConcurrentDictionary <string, IDocumentSymbolProvider>();
            IDocumentSymbolProvider[] documentSymbolProviders = new IDocumentSymbolProvider[]
            {
                new ScriptDocumentSymbolProvider(),
                new PsdDocumentSymbolProvider(),
                new PesterDocumentSymbolProvider(),
            };
            foreach (IDocumentSymbolProvider documentSymbolProvider in documentSymbolProviders)
            {
                _documentSymbolProviders.TryAdd(documentSymbolProvider.ProviderId, documentSymbolProvider);
            }
        }