EntityFramework.ApiDocs icon indicating copy to clipboard operation
EntityFramework.ApiDocs copied to clipboard

C# code snippets shown when VB filter is selected

Open divega opened this issue 7 years ago • 5 comments

This still not fixed after the fix for https://github.com/aspnet/EntityFramework.ApiDocs/issues/18.

Repro steps:

  1. Navigate to https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.relationaldatabasefacadeextensions.setcommandtimeout?view=efcore-2.1
  2. 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.

image

cc @dend @mairaw

divega avatar Jun 19 '18 19:06 divega

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.

divega avatar Jun 22 '18 23:06 divega

Interesting. Definitely a bug. @dend @joelmartinez to help with this.

mairaw avatar Jun 23 '18 00:06 mairaw

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.

divega avatar Jun 23 '18 00:06 divega

@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 avatar Jun 25 '18 13:06 joelmartinez

@joelmartinez @mairaw opened an issue here.

dend avatar Jul 09 '18 17:07 dend