Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute signature is not correct #393

Open
mairaw opened this issue Dec 6, 2018 · 5 comments
Open

Attribute signature is not correct #393

mairaw opened this issue Dec 6, 2018 · 5 comments
Assignees
Milestone

Comments

@mairaw
Copy link

mairaw commented Dec 6, 2018

This is an issue brought up by @riverar on MicrosoftDocs/feedback#298 (comment)

Type: https://docs.microsoft.com/en-us/dotnet/api/accessibility.caccpropservicesclass

According to the docs, there is no parameter-less constructor for ClassInterfaceAttribute.

mdoc is generating this:

<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
      <AttributeName>System.Runtime.InteropServices.ClassInterface</AttributeName>
</Attribute>

Source shows those monikers actually use the constructor with the ClassInterfaceType parameter:

[ClassInterface(ClassInterfaceType.None)]
@joelmartinez joelmartinez self-assigned this Dec 6, 2018
@joelmartinez joelmartinez added this to the mdoc 5.7.5 milestone Dec 6, 2018
@joelmartinez
Copy link
Member

@mairaw This source has since been changed to:

    <Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
      <AttributeName>System.Runtime.InteropServices.ClassInterface(0)</AttributeName>
    </Attribute>

So it's no longer showing as using an empty constructor ... is the value 0 correct, though?

@riverar
Copy link

riverar commented Mar 22, 2019

Hey @joelmartinez, that looks correct. 0 corresponds to ClassInterfaceType.None. The docs now show duplicate values, though:

[System.Runtime.InteropServices.ClassInterface(0)]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]

Source: https://referencesource.microsoft.com/#Accessibility/Accessibility/CAccPropServicesClass.cs,10

@joelmartinez
Copy link
Member

joelmartinez commented Mar 22, 2019

@riverar awesome, thanks for looking that up :) So it's "correct" now, but for some reason that enum value lookup didn't work (that's the only reason for the 'duplicate'). I'll leave this item open so we can investigate that and get it rendering with 100% fidelity :)

@mairaw
Copy link
Author

mairaw commented Mar 22, 2019

Thanks for your help validating that @riverar!

@mimisasouvanh
Copy link
Collaborator

Internal bug logged.

@mimisasouvanh mimisasouvanh modified the milestones: mdoc 5.7.5, mdoc 5.7.4 Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants