Exemplo n.º 1
0
        private async Task <QuickFixResponse> FindUsages(string source)
        {
            var workspace  = TestHelpers.CreateSimpleWorkspace(source);
            var controller = new OmnisharpController(workspace, null);
            var request    = CreateRequest(source);

            return(await controller.FindUsages(request));
        }
        private async Task <QuickFixResponse> FindUsages(Dictionary <string, string> sources, string currentFile, bool onlyThisFile, bool excludeDefinition = false)
        {
            var workspace  = TestHelpers.CreateSimpleWorkspace(sources);
            var controller = new OmnisharpController(workspace, null);
            var request    = CreateRequest(sources[currentFile], currentFile, excludeDefinition);

            request.OnlyThisFile = onlyThisFile;
            var bufferFilter = new UpdateBufferFilter(workspace);

            bufferFilter.OnActionExecuting(TestHelpers.CreateActionExecutingContext(request, controller));
            return(await controller.FindUsages(request));
        }
 private async Task<QuickFixResponse> FindUsages(Dictionary<string, string> sources, string currentFile, bool onlyThisFile, bool excludeDefinition = false)
 {
     var workspace = TestHelpers.CreateSimpleWorkspace(sources);
     var controller = new OmnisharpController(workspace, null);
     var request = CreateRequest(sources[currentFile], currentFile, excludeDefinition);
     request.OnlyThisFile = onlyThisFile;
     var bufferFilter = new UpdateBufferFilter(workspace);
     bufferFilter.OnActionExecuting(TestHelpers.CreateActionExecutingContext(request, controller));
     return await controller.FindUsages(request);
 }