Generic over Generic Func #5403
Unanswered
KeyserDSoze
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Sounds like covered by HKT? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have this situation
I'm trying to refactor AddTableStorageIdentity, AddCosmosStorageIdentity and AddBlobStorageIdentity with one main private method AddCustomStorageIdentity (to avoid a copy/paste on my code), in this last method I'm using a Func that I named 'withStorage' to manage the unique different behavior
but I can't create a "generic" delegate. The only chance that I thought is to create 4 different Func that I need to pass as argument.
Is it possible to write in a best way or is this already a best practice?
It would be very nice if exists something like this
How can I write lesser?
Beta Was this translation helpful? Give feedback.
All reactions