net_automatic_interface icon indicating copy to clipboard operation
net_automatic_interface copied to clipboard

Generic / nongeneric overloads are not created (tested 3.0.1-4.1.0)

Open realbart opened this issue 1 year ago • 4 comments

I'm missing interfaces Example code:

[GenerateAutomaticInterface]
public class AcrService
{
    public Task<T> CallAsync<T>(Func<AcrApiClient, Task<T>> func) => throw new NotImplementedException();

    public Task CallAsync(Func<AcrApiClient, Task> func) => throw new NotImplementedException();
}

This yields an interface with only one method

//--------------------------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// </auto-generated>
//--------------------------------------------------------------------------------------------------

using System.CodeDom.Compiler;

namespace MobiManagement.AcrClient
{
    [GeneratedCode("AutomaticInterface", "")]
    public partial interface IAcrService
    {
        /// <inheritdoc />
        System.Threading.Tasks.Task<T> CallAsync<T>(System.Func<MobiManagement.AcrClient.AcrApiClient, System.Threading.Tasks.Task<T>> func) ;
        
    }
}

realbart avatar Aug 12 '24 11:08 realbart

Oops - I think the new code to remove shadowing (via new...) interferes here. Ok I will look into it

ChristianSauer avatar Aug 13 '24 06:08 ChristianSauer

This was my mistake 🤦‍♀️ - I should have passed in genericOptions when creating the SymbolDisplayFormat used for deduplication - I can have a look at this if you haven't already started @ChristianSauer.

simonmckenzie avatar Aug 13 '24 11:08 simonmckenzie

Yes, if you have time. I would guess the same problem applies to properties and Events

Gesendet von Outlook für Androidhttps://aka.ms/AAb9ysg


From: simonmckenzie @.> Sent: Tuesday, August 13, 2024 1:00:34 PM To: codecentric/net_automatic_interface @.> Cc: Christian Sauer @.>; Mention @.> Subject: Re: [codecentric/net_automatic_interface] Generic / nongeneric overloads are not created (tested 3.0.1-4.1.0) (Issue #56)

This was my mistake 🤦‍♀️ - I should have passed in genericOptions when creating the SymbolDisplayFormat used for deduplication - I can have a look at this if you're busy @ChristianSauerhttps://github.com/ChristianSauer.

— Reply to this email directly, view it on GitHubhttps://github.com/codecentric/net_automatic_interface/issues/56#issuecomment-2285967402, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXKCSNEGGHE5OLAVTKF4B3ZRHRNFAVCNFSM6AAAAABML6U4UKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBVHE3DONBQGI. You are receiving this because you were mentioned.Message ID: @.***>

ChristianSauer avatar Aug 13 '24 11:08 ChristianSauer

Done. Note that this does not affect properties and events, since they can't be overloaded.

simonmckenzie avatar Aug 14 '24 00:08 simonmckenzie

Should be fixed

ChristianSauer avatar Sep 01 '24 18:09 ChristianSauer

I've rebased PR #58 after the merge of #60 - this is still an issue.

simonmckenzie avatar Sep 01 '24 23:09 simonmckenzie

Hi @ChristianSauer ,

This has not been fixed - it will be fixed when #58 is merged.

simonmckenzie avatar Oct 15 '24 20:10 simonmckenzie

Hi @realbart,

The fix for this was deployed in yesterday's release.

simonmckenzie avatar Nov 29 '24 21:11 simonmckenzie

Wonderful!

Verzonden vanaf Outlook voor Androidhttps://aka.ms/AAb9ysg


From: Simon MᶜKenzie @.> Sent: Friday, November 29, 2024 10:12:22 PM To: codecentric/net_automatic_interface @.> Cc: Bart @.>; Mention @.> Subject: Re: [codecentric/net_automatic_interface] Generic / nongeneric overloads are not created (tested 3.0.1-4.1.0) (Issue #56)

Hi @realbarthttps://github.com/realbart,

The fix for this was deployed in yesterday's release.

— Reply to this email directly, view it on GitHubhttps://github.com/codecentric/net_automatic_interface/issues/56#issuecomment-2508668016, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABZXLZPF3KR6WFYMOWLASWD2DDKDNAVCNFSM6AAAAABML6U4UKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBYGY3DQMBRGY. You are receiving this because you were mentioned.Message ID: @.***>

realbart avatar Dec 01 '24 07:12 realbart