public EditorCommandHandlerServiceFactory(
            [ImportMany] IEnumerable <Lazy <ICommandHandler, ICommandHandlerMetadata> > commandHandlers,
            [ImportMany] IEnumerable <Lazy <ICommandingTextBufferResolverProvider, IContentTypeMetadata> > bufferResolvers,
            IUIThreadOperationExecutor uiThreadOperationExecutor,
            JoinableTaskContext joinableTaskContext,
            IStatusBarService statusBar,
            IContentTypeRegistryService contentTypeRegistryService,
            IGuardedOperations guardedOperations,
            ILoggingServiceInternal loggingService)
        {
            UIThreadOperationExecutor = uiThreadOperationExecutor;
            JoinableTaskContext       = joinableTaskContext;
            StatusBar         = statusBar;
            GuardedOperations = guardedOperations;
            LoggingService    = loggingService;

            _contentTypeRegistryService = contentTypeRegistryService;
            ContentTypeOrderer          = new StableContentTypeOrderer <ICommandHandler, ICommandHandlerMetadata>(_contentTypeRegistryService);
            _commandHandlers            = OrderCommandHandlers(commandHandlers);
            if (!bufferResolvers.Any())
            {
                throw new ImportCardinalityMismatchException($"Expected to import at least one {typeof(ICommandingTextBufferResolver).Name}");
            }

            _bufferResolverProviders = bufferResolvers.ToList();
        }
Ejemplo n.º 2
0
 public CompletionTelemetryHost(ILoggingServiceInternal logger, AsyncCompletionBroker broker, string textViewContentType)
 {
     _logger = logger;
     _broker = broker;
     _textViewContentType = textViewContentType;
 }