From 0bc049d49674e2e8d151266fb5e18ed4272601ef Mon Sep 17 00:00:00 2001 From: Allison Chou Date: Fri, 17 Mar 2023 15:01:20 -0700 Subject: [PATCH] Fix build break --- .../DefaultRazorDocumentMappingService.cs | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultRazorDocumentMappingService.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultRazorDocumentMappingService.cs index 23caf3123d6..07f5855fa60 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultRazorDocumentMappingService.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/DefaultRazorDocumentMappingService.cs @@ -994,44 +994,4 @@ private static IReadOnlyList GetTagHelperSpans(RazorCodeD return tagHelperSpans; } - - private static IReadOnlyList GetClassifiedSpans(RazorCodeDocument document) - { - // Since this service is called so often, we get a good performance improvement by caching these values - // for this code document. If the document changes, as the user types, then the document instance will be - // different, so we don't need to worry about invalidating the cache. - var classifiedSpans = (IReadOnlyList)document.Items[typeof(ClassifiedSpanInternal)]; - if (classifiedSpans is null) - { - var syntaxTree = document.GetSyntaxTree(); - - var visitor = new ClassifiedSpanVisitor(syntaxTree.Source); - visitor.Visit(syntaxTree.Root); - classifiedSpans = visitor.ClassifiedSpans; - - document.Items[typeof(ClassifiedSpanInternal)] = classifiedSpans; - } - - return classifiedSpans; - } - - private static IReadOnlyList GetTagHelperSpans(RazorCodeDocument document) - { - // Since this service is called so often, we get a good performance improvement by caching these values - // for this code document. If the document changes, as the user types, then the document instance will be - // different, so we don't need to worry about invalidating the cache. - var tagHelperSpans = (IReadOnlyList)document.Items[typeof(TagHelperSpanInternal)]; - if (tagHelperSpans is null) - { - var syntaxTree = document.GetSyntaxTree(); - - var visitor = new TagHelperSpanVisitor(syntaxTree.Source); - visitor.Visit(syntaxTree.Root); - tagHelperSpans = visitor.TagHelperSpans; - - document.Items[typeof(TagHelperSpanInternal)] = tagHelperSpans; - } - - return tagHelperSpans; - } }