liubiao4123 / servicestack

Automatically exported from code.google.com/p/servicestack
0 stars 0 forks source link

Make SendExpectXXX commands public #48

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Some redis commands don't seem to be supported by the current RedisClient 
implementation (e.g. CONFIG). It would be great if all the SendCommand methods 
would be public, so that anybody is able to send new/unsupported commands.

Especially for the CONFIG command it would be nice to have an accessor like 
this:

client.Configuration["save"] = "900 1 300 10 60 1000";

Or even typed access like this:

client.Configuration.Save = new []
{
    new SaveConfigurationSetting(900, 1),
    new SaveConfigurationSetting(300, 10),
    new SaveConfigurationSetting(60, 1000),
};

Original issue reported on code.google.com by daniel.k...@googlemail.com on 21 Nov 2010 at 12:44

GoogleCodeExporter commented 8 years ago
Yeah I'm not a big fan of exposing internal methods, it inhibits re-factoring 
and would simply prefer to receive a patch for any unimplemented commands so 
all users end up benefiting rather than them maintaining their own custom 
implementations.

I think initially I prefer something like:
client.ServerConfig["save"] = "900 1 300 10 60 1000";

For greater simplicity and flexibility.

- Demis

Original comment by demis.be...@gmail.com on 21 Nov 2010 at 5:14

GoogleCodeExporter commented 8 years ago
Yes, I thought about "ServerConfig" instead of "Configuration", but there's 
also the property "Info" that actually exposes server information, so I 
prefered "Configuration".

However, for now the CONFIG command is the only one I miss. It would be great 
to see it in the next release.

Original comment by daniel.k...@googlemail.com on 21 Nov 2010 at 11:49