StackExchange/StackExchange.Redis — pull request #141 by kevin-montrose (2015-01-01 00:29:30+00:00)
Title: add TryParse() methods to Redis.Value for common conversion; exposing publicly functions already available internally

We've got a bit of an pattern in some code (let's just say it involves an all seeing eye) where hashes are key'd by number *except* for one key that has a proper string-y name.

Right now we either have to treat everything as a `string` (implying extra allocations), pass `RedisValue` around everywhere (making comparisons less efficient than they could be, but avoiding allocations), try/catch conversions (inefficient to say the least), or check the first `byte[]` to see if the the value looks like a number and proceed accordingly. The last one works, but is kind of ugly.

This PR exposes the already existing [`TryParseInt64`](https://github.com/StackExchange/StackExchange.Redis/blob/d994b7ad57a76586487cd2d460d55cb850498448/StackExchange.Redis/StackExchange/Redis/RedisValue.cs#L216) and [`TryParseDouble`](https://github.com/StackExchange/StackExchange.Redis/blob/d994b7ad57a76586487cd2d460d55cb850498448/StackExchange.Redis/StackExchange/Redis/RedisValue.cs#L456) methods wrapped up in a slightly nicer interface.