File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1010using Microsoft . AspNetCore . Razor . Language . Syntax ;
1111using Microsoft . CodeAnalysis ;
1212using Microsoft . CodeAnalysis . Razor ;
13+ using Microsoft . CodeAnalysis . Razor . ProjectSystem ;
1314using Microsoft . CodeAnalysis . Razor . Protocol ;
1415using Microsoft . CodeAnalysis . Text ;
1516
@@ -42,6 +43,11 @@ public static SourceText GetHtmlSourceText(this RazorCodeDocument document)
4243 /// Retrieves a cached Roslyn <see cref="SyntaxTree"/> from the generated C# document.
4344 /// If a tree has not yet been cached, a new one will be parsed and added to the cache.
4445 /// </summary>
46+ /// <remarks>
47+ /// If possible, prefer calling <see cref="IDocumentSnapshot.GetCSharpSyntaxTreeAsync(CancellationToken)" />
48+ /// because it will either call this method, or in cohosting get the syntax tree from Roslyn, where the cached
49+ /// tree can be shared with many more features.
50+ /// </remarks>
4551 public static SyntaxTree GetOrParseCSharpSyntaxTree ( this RazorCodeDocument document , CancellationToken cancellationToken )
4652 => GetCachedData ( document ) . GetOrParseCSharpSyntaxTree ( cancellationToken ) ;
4753
You can’t perform that action at this time.
0 commit comments