示例#1
0
        public Task <ExecutionResult> InitializeAsync()
        {
            if (_evaluator == null && !string.IsNullOrEmpty(_evaluatorId))
            {
                SetEvaluator(_evaluatorId);
                return(ExecutionResult.Succeeded);
            }

            return(_evaluator?.InitializeAsync() ?? ExecutionResult.Succeeded);
        }
示例#2
0
        private async Task DoInitializeAsync(IInteractiveEvaluator eval)
        {
            await eval.InitializeAsync();

            var view   = eval?.CurrentWindow?.TextView;
            var buffer = eval?.CurrentWindow?.CurrentLanguageBuffer;

            if (view != null && buffer != null)
            {
                var controller = IntellisenseControllerProvider.GetOrCreateController(_serviceProvider, _serviceProvider.GetComponentModel(), view);
                controller.DisconnectSubjectBuffer(buffer);
                controller.ConnectSubjectBuffer(buffer);
            }
        }
示例#3
0
 public static Task <ExecutionResult> _Initialize(this IInteractiveEvaluator self, IInteractiveWindow window)
 {
     self.CurrentWindow = window;
     return(self.InitializeAsync());
 }
示例#4
0
 private async Task DoInitializeAsync(IInteractiveEvaluator eval)
 {
     await eval.InitializeAsync();
 }
示例#5
0
        private async Task DoInitializeAsync(IInteractiveEvaluator eval) {
            await eval.InitializeAsync();

            var view = eval?.CurrentWindow?.TextView;
            var buffer = eval?.CurrentWindow?.CurrentLanguageBuffer;
            if (view != null && buffer != null) {
                var controller = IntellisenseControllerProvider.GetOrCreateController(_serviceProvider, _serviceProvider.GetComponentModel(), view);
                controller.DisconnectSubjectBuffer(buffer);
                controller.ConnectSubjectBuffer(buffer);
            }
        }