zompinc / sync-method-generator

Generates a synchronized version of an async method
MIT License
49 stars 4 forks source link

[Feature Request] Implement sync method DECLARATION inside of interface. #87

Open lsoft opened 1 month ago

lsoft commented 1 month ago

The generator is able to build sync sibling for an async method. That's great tool for us, we have 130 usages of [Zomp.SyncMethodGenerator.CreateSyncVersion] in our project.

I ask for a feature, when the generator will be able to build a sync method declaration inside in interfaces:

//we have
    public partial interface IA
    {
        [Zomp.SyncMethodGenerator.CreateSyncVersion]
        Task<int> SomeMethodAsync();
    }

//generator build:
    public partial interface IA
    {
        int SomeMethod();
    }
virzak commented 1 month ago

Hey Vyacheslav, good to hear from you.

Will implement on the weekend!

Really happy about the usages!