garnet icon indicating copy to clipboard operation
garnet copied to clipboard

GarnetClient Extensions

Open hishamco opened this issue 1 year ago • 7 comments

Feature request type

enhancement

Is your feature request related to a problem? Please describe

While there are few implemented commands for GarnetClient are you open to accepting PRs for implementing other commands on top of ExecuteForStringResultAsync() or ExecuteForStringArrayResultAsync()

I find myself writing some here https://github.com/OrchardCoreContrib/OrchardCoreContrib.Modules/blob/main/src/OrchardCoreContrib.Garnet/Extensions/GarnetClientExtensions.cs

Also there are two in this PR https://github.com/OrchardCoreContrib/OrchardCoreContrib.Modules/pull/127/files

Describe the solution you'd like

Add extension methods to GarnetClient

Describe alternatives you've considered

No response

Additional context

No response

hishamco avatar May 11 '24 22:05 hishamco

/cc @TalZaccai

hishamco avatar May 11 '24 22:05 hishamco

Yes, we are definitely open to accepting pull requests in this space. Thanks, and look forward to it!

badrishc avatar May 12 '24 17:05 badrishc

Believe it or not yesterday I planned to start my library but I thought it be better to file an issue than hear the response, @badrishc could you please look for one of the extensions that I created if it's fine I can start push a PR

BTW shall we add it as extension methods or where should I add them, coz it's the first time to contribute here

hishamco avatar May 12 '24 17:05 hishamco

These can be added at https://github.com/microsoft/garnet/tree/main/libs/client/GarnetClientAPI - you will see there are already files for different API categories, such as Sorted Set. You would add the new ones similarly.

badrishc avatar May 13 '24 23:05 badrishc

Got it, I will start my PRs :)

One more thing but it might be breaking change why you are using Garnet.client namespace instead of Garnet.Client it is against the namespace rules

hishamco avatar May 13 '24 23:05 hishamco

It was just a stylistic choice. We can leave it as Garnet.client - it is fine as long as our format style does not complain.

badrishc avatar May 14 '24 00:05 badrishc

+1 for following the standardized practice in .NET of PascalCasing the namespaces.

PaulusParssinen avatar May 17 '24 01:05 PaulusParssinen