-
Notifications
You must be signed in to change notification settings - Fork 14
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
Interfaces generated for classes with override
or new
methods contain duplicates
#50
Comments
Resolved by the merge of #51 |
Hi all <PackageReference Include="AutomaticInterface" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> file class GenerateAutomaticInterface : Attribute;
[GenerateAutomaticInterface]
file class MyButton : System.Windows.Forms.Button;
// OR
[GenerateAutomaticInterface]
file class MyButton : System.Windows.Forms.Button
{
// This gives **2** instances of the error
public new event System.EventHandler? ImeModeChanged;
} I really like the package though - thanks for your work so far! |
HI @FinnAngelo, My fix was only for methods. It looks like we'll need another issue for events 🤦 Would you be interested in doing this? It'll be much the same as in this PR: #33 If not, I can have a look later in the week. |
Hi @simonmckenzie - I wont be able to start till this weekend (Sat 10 Aug) but yeah, sure! |
The current code will insert multiple definitions of a method when that method has been overridden or shadowed via
new
.For example, given these two classes:
The generated interface will look like this:
The text was updated successfully, but these errors were encountered: