private IntellisenseService CreateIntellisenseService() { var service = new IntellisenseService(environment, commandManagement); registerToMessageBus.Register <IInputTreeUpdatedMessage>(service); return(service); }
private async Task <IEnumerable <string> > FindCompletionsAsync(string source) { var workspace = await TestHelpers.CreateSimpleWorkspace(source); var controller = new IntellisenseService(workspace, new FormattingOptions()); var request = CreateRequest(source); var response = await controller.Handle(request); var completions = response as IEnumerable <AutoCompleteResponse>; return(completions.Select(completion => BuildCompletion(completion))); }
private async Task <IEnumerable <AutoCompleteResponse> > FindCompletionsAsync(string source, AutoCompleteRequest request = null) { var workspace = await TestHelpers.CreateSimpleWorkspace(_plugInHost, source); var controller = new IntellisenseService(workspace, new FormattingOptions()); if (request == null) { request = CreateRequest(source); } var response = await controller.Handle(request); var completions = response as IEnumerable <AutoCompleteResponse>; return(completions); }
private async Task<IEnumerable<AutoCompleteResponse>> FindCompletionsAsync(string source, AutoCompleteRequest request = null) { var workspace = await TestHelpers.CreateSimpleWorkspace(source); var controller = new IntellisenseService(workspace, new FormattingOptions()); if (request == null) { request = CreateRequest(source); } var response = await controller.Handle(request); var completions = response as IEnumerable<AutoCompleteResponse>; return completions; }