Open Youssef1313 opened 3 years ago
Note that the API is 7-years old :smile:
Also note that MOSTLY ALL extension methods leads to the incorrect link. They redirect to the C# version.
cc @jmarolf
I would have thought this would be onboarded with the roslyn-api-docs repo. Any ideas why it's missing?
Those extension methods do appear in the API docs here: https://review.docs.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.visualbasic.syntaxextensions?view=roslyn-dotnet&branch=master#methods. They are just not appearing under the Extensions Methods section of the types they extend. I logged an internal bug to look into that.
As to the C# methods like https://review.docs.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.csharp.csharpextensions.kind?view=roslyn-dotnet&branch=master#Microsoft_CodeAnalysis_CSharp_CSharpExtensions_Kind_Microsoft_CodeAnalysis_SyntaxNode_ being listed, I actually think that is correct according to the signature of that method, because the VB syntax nodes derive from the first parameter type. I'm a bit surprised that the extension method returns a C#-specific type (Microsoft.CodeAnalysis.CSharp.SyntaxKind), but doesn't require that the argument (type it extends) is C#-specific. Any thoughts on that?
public static Microsoft.CodeAnalysis.CSharp.SyntaxKind Kind (this Microsoft.CodeAnalysis.SyntaxNode node);
Also, the corresponding VB-specific method (https://review.docs.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.visualbasic.visualbasicsyntaxnode.kind?view=roslyn-dotnet&branch=master) is not an extension method, so it wouldn't be listed there under NewExpressionSyntax extension methods.
Also, the corresponding VB-specific method (https://review.docs.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.visualbasic.visualbasicsyntaxnode.kind?view=roslyn-dotnet&branch=master) is not an extension method, so it wouldn't be listed there under NewExpressionSyntax extension methods.
There is a Kind
extension method.
https://github.com/dotnet/roslyn/blob/91571a3bb038e05e7bf2ab87510273a1017faed0/src/Compilers/VisualBasic/Portable/Syntax/SyntaxExtensions.vb#L48-L63
It's already a public API in roslyn. But the extension methods section doesn't show it.
cc: @gewarren
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.