Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add overload to take redis server URLs

  • Loading branch information...
commit a4a943f8b4e3b7b17faf7f36e5e71bc40dd1856d 1 parent f6c1aec
@johnsheehan johnsheehan authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/ServiceStack.Redis/RedisClient.cs
View
8 src/ServiceStack.Redis/RedisClient.cs
@@ -56,6 +56,14 @@ public RedisClient(string host, int port, string password)
Init();
}
+ public RedisClient(Uri uri)
+ : base(uri.Host, uri.Port)
+ {
+ var password = !string.IsNullOrEmpty(uri.UserInfo) ? uri.UserInfo.Split(':')[1] : null;
+ Password = password;
+ Init();
+ }
+
public void Init()
{
this.Lists = new RedisClientLists(this);
Please sign in to comment.
Something went wrong with that request. Please try again.