Skip to content

Commit

Permalink
Revert "Merge release/dev17.5 to release/dev17.6 (#8437)" (#8439)
Browse files Browse the repository at this point in the history
This reverts commit 16c233b.
  • Loading branch information
phil-allen-msft committed Mar 17, 2023
1 parent 1d1d372 commit 0d30c86
Showing 1 changed file with 0 additions and 200 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -994,204 +994,4 @@ private static IReadOnlyList<TagHelperSpanInternal> GetTagHelperSpans(RazorCodeD

return tagHelperSpans;
}

private static IReadOnlyList<ClassifiedSpanInternal> 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<ClassifiedSpanInternal>)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<TagHelperSpanInternal> 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<TagHelperSpanInternal>)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;
}

private static IReadOnlyList<ClassifiedSpanInternal> 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<ClassifiedSpanInternal>)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<TagHelperSpanInternal> 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<TagHelperSpanInternal>)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;
}

private static IReadOnlyList<ClassifiedSpanInternal> 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<ClassifiedSpanInternal>)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<TagHelperSpanInternal> 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<TagHelperSpanInternal>)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;
}

private static IReadOnlyList<ClassifiedSpanInternal> 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<ClassifiedSpanInternal>)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<TagHelperSpanInternal> 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<TagHelperSpanInternal>)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;
}

private static IReadOnlyList<ClassifiedSpanInternal> 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<ClassifiedSpanInternal>)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<TagHelperSpanInternal> 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<TagHelperSpanInternal>)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;
}
}

0 comments on commit 0d30c86

Please sign in to comment.