EntityFramework.ApiDocs
EntityFramework.ApiDocs copied to clipboard
C# code snippets shown when VB filter is selected
This still not fixed after the fix for https://github.com/aspnet/EntityFramework.ApiDocs/issues/18.
Repro steps:
- Navigate to https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.relationaldatabasefacadeextensions.setcommandtimeout?view=efcore-2.1
- Select VB from the language drop down
Result:
C# snippet is shown. The C# and F# options in the drop down seem to be working correctly.

cc @dend @mairaw
I just noticed that this only happens on some member pages. So far the class pages I have tried seem to work ok.
If you look at the XML files, like https://github.com/aspnet/EntityFramework.ApiDocs/blob/live/dotnet/xml/Microsoft.EntityFrameworkCore/SqlServerEntityTypeBuilderExtensions.xml, which corresponds to https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.sqlserverentitytypebuilderextensions.forsqlserverismemoryoptimized?view=efcore-2.1, the VB.NET MemberSignature is missing for some of the methods.
I am not sure if there is a pattern. In some types, like the one above, the VB.NET MemberSignature is missing for non-generic methods, but in https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.entityframeworkqueryableextensions?view=efcore-2.1, there missing ones for generic methods as well.
Interesting. Definitely a bug. @dend @joelmartinez to help with this.
FWIW, I looked at the ASP.NET Core documentation to see if I could find the same issue. I found a couple of cases:
- https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.connectioninfo.getclientcertificateasync?view=aspnetcore-2.1
- https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.routermiddleware.invoke?view=aspnetcore-2.1
Those pages don't have VB signatures either, but the option to select VB is missing in the drop down.
@mairaw There are certain cases where the VB formatter won't generate a signature, but a casual glance at this doesn't seem to match those cases. Can you open a GH issue so we can review this behavior and see where the discrepancy is?
@joelmartinez @mairaw opened an issue here.