コード例 #1
0
        internal InteractiveEvaluator(
            IContentType contentType,
            HostServices hostServices,
            IViewClassifierAggregatorService classifierAggregator,
            IInteractiveWindowCommandsFactory commandsFactory,
            ImmutableArray <IInteractiveWindowCommand> commands,
            string responseFilePath,
            string initialWorkingDirectory,
            string interactiveHostPath,
            Type replType)
        {
            Debug.Assert(responseFilePath == null || PathUtilities.IsAbsolute(responseFilePath));

            _contentType               = contentType;
            _responseFilePath          = responseFilePath;
            _workspace                 = new InteractiveWorkspace(hostServices);
            _contentTypeChangedHandler = new EventHandler <ContentTypeChangedEventArgs>(LanguageBufferContentTypeChanged);
            _classifierAggregator      = classifierAggregator;
            _initialWorkingDirectory   = initialWorkingDirectory;
            _commandsFactory           = commandsFactory;
            _commands = commands;

            // The following settings will apply when the REPL starts without .rsp file.
            // They are discarded once the REPL is reset.
            ReferenceSearchPaths = ImmutableArray <string> .Empty;
            SourceSearchPaths    = ImmutableArray <string> .Empty;
            WorkingDirectory     = initialWorkingDirectory;
            var metadataService = _workspace.CurrentSolution.Services.MetadataService;

            _metadataReferenceResolver = CreateMetadataReferenceResolver(metadataService, ReferenceSearchPaths, _initialWorkingDirectory);
            _sourceReferenceResolver   = CreateSourceReferenceResolver(SourceSearchPaths, _initialWorkingDirectory);

            _interactiveHost = new InteractiveHost(replType, interactiveHostPath, initialWorkingDirectory);
            _interactiveHost.ProcessStarting += ProcessStarting;
        }
コード例 #2
0
        internal InteractiveEvaluator(
            IContentType contentType,
            HostServices hostServices,
            IViewClassifierAggregatorService classifierAggregator,
            IInteractiveWindowCommandsFactory commandsFactory,
            IInteractiveWindowCommand[] commands,
            string responseFilePath,
            string initialWorkingDirectory,
            string interactiveHostPath,
            Type replType)
        {
            Debug.Assert(responseFilePath == null || PathUtilities.IsAbsolute(responseFilePath));

            _contentType               = contentType;
            _responseFilePath          = responseFilePath;
            _workspace                 = new InteractiveWorkspace(this, hostServices);
            _contentTypeChangedHandler = new EventHandler <ContentTypeChangedEventArgs>(LanguageBufferContentTypeChanged);
            _classifierAggregator      = classifierAggregator;
            _initialWorkingDirectory   = initialWorkingDirectory;
            _commandsFactory           = commandsFactory;
            _commands = commands.ToImmutableArray();

            var hostPath = interactiveHostPath;

            _interactiveHost = new InteractiveHost(replType, hostPath, initialWorkingDirectory);
            _interactiveHost.ProcessStarting += ProcessStarting;
        }
コード例 #3
0
        internal InteractiveEvaluator(
            IContentType contentType,
            HostServices hostServices,
            IViewClassifierAggregatorService classifierAggregator,
            IInteractiveWindowCommandsFactory commandsFactory,
            ImmutableArray<IInteractiveWindowCommand> commands,
            string responseFilePath,
            string initialWorkingDirectory,
            string interactiveHostPath,
            Type replType)
        {
            Debug.Assert(responseFilePath == null || PathUtilities.IsAbsolute(responseFilePath));

            _contentType = contentType;
            _responseFilePath = responseFilePath;
            _workspace = new InteractiveWorkspace(this, hostServices);
            _contentTypeChangedHandler = new EventHandler<ContentTypeChangedEventArgs>(LanguageBufferContentTypeChanged);
            _classifierAggregator = classifierAggregator;
            _initialWorkingDirectory = initialWorkingDirectory;
            _commandsFactory = commandsFactory;
            _commands = commands;

            var hostPath = interactiveHostPath;
            _interactiveHost = new InteractiveHost(replType, hostPath, initialWorkingDirectory);
            _interactiveHost.ProcessStarting += ProcessStarting;
        }
コード例 #4
0
        internal InteractiveEvaluator(
            IContentType contentType,
            HostServices hostServices,
            IViewClassifierAggregatorService classifierAggregator,
            IInteractiveWindowCommandsFactory commandsFactory,
            ImmutableArray<IInteractiveWindowCommand> commands,
            string responseFilePath,
            string initialWorkingDirectory,
            string interactiveHostPath,
            Type replType)
        {
            Debug.Assert(responseFilePath == null || PathUtilities.IsAbsolute(responseFilePath));

            _contentType = contentType;
            _responseFilePath = responseFilePath;
            _workspace = new InteractiveWorkspace(this, hostServices);
            _contentTypeChangedHandler = new EventHandler<ContentTypeChangedEventArgs>(LanguageBufferContentTypeChanged);
            _classifierAggregator = classifierAggregator;
            _initialWorkingDirectory = initialWorkingDirectory;
            _commandsFactory = commandsFactory;
            _commands = commands;

            // The following settings will apply when the REPL starts without .rsp file.
            // They are discarded once the REPL is reset.
            ReferenceSearchPaths = ImmutableArray<string>.Empty;
            SourceSearchPaths = ImmutableArray<string>.Empty;
            WorkingDirectory = initialWorkingDirectory;
            var metadataService = _workspace.CurrentSolution.Services.MetadataService;
            _metadataReferenceResolver = CreateMetadataReferenceResolver(metadataService, ReferenceSearchPaths, _initialWorkingDirectory);
            _sourceReferenceResolver = CreateSourceReferenceResolver(SourceSearchPaths, _initialWorkingDirectory);

            _interactiveHost = new InteractiveHost(replType, interactiveHostPath, initialWorkingDirectory);
            _interactiveHost.ProcessStarting += ProcessStarting;
        }
コード例 #5
0
 public CSharpVsInteractiveWindowProvider(
     SVsServiceProvider serviceProvider,
     IVsInteractiveWindowFactory interactiveWindowFactory,
     IViewClassifierAggregatorService classifierAggregator,
     IContentTypeRegistryService contentTypeRegistry,
     IInteractiveWindowCommandsFactory commandsFactory,
     [ImportMany] IInteractiveWindowCommand[] commands,
     VisualStudioWorkspace workspace)
     : base(serviceProvider, interactiveWindowFactory, classifierAggregator, contentTypeRegistry, commandsFactory, commands, workspace)
 {
 }
コード例 #6
0
 public CSharpVsInteractiveWindowProvider(
     SVsServiceProvider serviceProvider,
     IVsInteractiveWindowFactory interactiveWindowFactory,
     IViewClassifierAggregatorService classifierAggregator,
     IContentTypeRegistryService contentTypeRegistry,
     IInteractiveWindowCommandsFactory commandsFactory,
     [ImportMany]IInteractiveWindowCommand[] commands,
     VisualStudioWorkspace workspace)
     : base(serviceProvider, interactiveWindowFactory, classifierAggregator, contentTypeRegistry, commandsFactory, commands, workspace)
 {
 }
コード例 #7
0
 public CSharpVsInteractiveWindowProvider(
     IThreadingContext threadingContext,
     SVsServiceProvider serviceProvider,
     IAsynchronousOperationListenerProvider listenerProvider,
     IVsInteractiveWindowFactory interactiveWindowFactory,
     IViewClassifierAggregatorService classifierAggregator,
     IContentTypeRegistryService contentTypeRegistry,
     IInteractiveWindowCommandsFactory commandsFactory,
     [ImportMany] IInteractiveWindowCommand[] commands,
     VisualStudioWorkspace workspace)
     : base(serviceProvider, interactiveWindowFactory, classifierAggregator, contentTypeRegistry, commandsFactory, commands, workspace)
 {
     _threadingContext = threadingContext;
     _listener         = listenerProvider.GetListener(FeatureAttribute.InteractiveEvaluator);
 }
コード例 #8
0
 public VsInteractiveWindowProvider(
     SVsServiceProvider serviceProvider,
     IVsInteractiveWindowFactory interactiveWindowFactory,
     IViewClassifierAggregatorService classifierAggregator,
     IContentTypeRegistryService contentTypeRegistry,
     IInteractiveWindowCommandsFactory commandsFactory,
     IInteractiveWindowCommand[] commands,
     VisualStudioWorkspace workspace)
 {
     _vsServiceProvider          = serviceProvider;
     _classifierAggregator       = classifierAggregator;
     _contentTypeRegistry        = contentTypeRegistry;
     _vsWorkspace                = workspace;
     _commands                   = FilterCommands(commands, contentType: PredefinedInteractiveCommandsContentTypes.InteractiveCommandContentTypeName);
     _vsInteractiveWindowFactory = interactiveWindowFactory;
     _commandsFactory            = commandsFactory;
 }
コード例 #9
0
 public VsInteractiveWindowProvider(
    SVsServiceProvider serviceProvider,
    IVsInteractiveWindowFactory interactiveWindowFactory,
    IViewClassifierAggregatorService classifierAggregator,
    IContentTypeRegistryService contentTypeRegistry,
    IInteractiveWindowCommandsFactory commandsFactory,
    IInteractiveWindowCommand[] commands,
    VisualStudioWorkspace workspace)
 {
     _vsServiceProvider = serviceProvider;
     _classifierAggregator = classifierAggregator;
     _contentTypeRegistry = contentTypeRegistry;
     _vsWorkspace = workspace;
     _commands = FilterCommands(commands, contentType: PredefinedInteractiveCommandsContentTypes.InteractiveCommandContentTypeName);
     _vsInteractiveWindowFactory = interactiveWindowFactory;
     _commandsFactory = commandsFactory;
 }
 public CSharpInteractiveEvaluator(
     HostServices hostServices,
     IViewClassifierAggregatorService classifierAggregator,
     IInteractiveWindowCommandsFactory commandsFactory,
     ImmutableArray <IInteractiveWindowCommand> commands,
     IContentTypeRegistryService contentTypeRegistry,
     string responseFileDirectory,
     string initialWorkingDirectory)
     : base(
         contentTypeRegistry.GetContentType(ContentTypeNames.CSharpContentType),
         hostServices,
         classifierAggregator,
         commandsFactory,
         commands,
         (responseFileDirectory != null) ? Path.Combine(responseFileDirectory, InteractiveResponseFile) : null,
         initialWorkingDirectory,
         typeof(CSharpReplServiceProvider))
 {
 }
コード例 #11
0
 public CSharpInteractiveEvaluator(
     IThreadingContext threadingContext,
     HostServices hostServices,
     IViewClassifierAggregatorService classifierAggregator,
     IInteractiveWindowCommandsFactory commandsFactory,
     ImmutableArray <IInteractiveWindowCommand> commands,
     IContentTypeRegistryService contentTypeRegistry,
     string initialWorkingDirectory)
     : base(
         threadingContext,
         contentTypeRegistry.GetContentType(ContentTypeNames.CSharpContentType),
         hostServices,
         classifierAggregator,
         commandsFactory,
         commands,
         InteractiveResponseFile,
         initialWorkingDirectory,
         typeof(CSharpReplServiceProvider))
 {
 }
コード例 #12
0
 public CSharpInteractiveEvaluator(
     HostServices hostServices,
     IViewClassifierAggregatorService classifierAggregator,
     IInteractiveWindowCommandsFactory commandsFactory,
     ImmutableArray<IInteractiveWindowCommand> commands,
     IContentTypeRegistryService contentTypeRegistry,
     string responseFileDirectory,
     string initialWorkingDirectory)
     : base(
         contentTypeRegistry.GetContentType(ContentTypeNames.CSharpContentType),
         hostServices,
         classifierAggregator,
         commandsFactory,
         commands,
         (responseFileDirectory != null) ? Path.Combine(responseFileDirectory, InteractiveResponseFile) : null,
         initialWorkingDirectory,
         typeof(InteractiveHostEntryPoint).Assembly.Location,
         typeof(CSharpReplServiceProvider))
 {
 }
コード例 #13
0
 public CSharpInteractiveEvaluator(
     HostServices hostServices,
     IViewClassifierAggregatorService classifierAggregator,
     IInteractiveWindowCommandsFactory commandsFactory,
     IInteractiveWindowCommand[] commands,
     IContentTypeRegistryService contentTypeRegistry,
     string responseFileDirectory,
     string initialWorkingDirectory)
     : base(
         contentTypeRegistry.GetContentType(ContentTypeNames.CSharpContentType),
         hostServices,
         classifierAggregator,
         commandsFactory,
         commands,
         (responseFileDirectory != null) ? Path.Combine(responseFileDirectory, InteractiveResponseFile) : null,
         initialWorkingDirectory,
         typeof(InteractiveHostEntryPoint).Assembly.Location,
         typeof(CSharpRepl))
 {
 }