Apachai.BackingStore.RegisterImageWithTweet C# (CSharp) Method

RegisterImageWithTweet() public method

public RegisterImageWithTweet ( long uid, string picture, string tweet, string longUrl, string shortUrl ) : void
uid long
picture string
tweet string
longUrl string
shortUrl string
return void
        public void RegisterImageWithTweet(long uid, string picture, string tweet, string longUrl, string shortUrl)
        {
            if (!DoWeKnowUser (uid))
                throw new ArgumentException ("User is unknown is the database");

            using (var redis = redisManager.GetClient ()) {
                string id = uid.ToString ();
                redis.PrependItemToList (userPictures + id, picture);
                redis[picTweet + picture] = tweet;
                redis[picUser + picture] = id;
                redis[picLongUrl + picture] = longUrl;
                redis[picShortUrl + picture] = shortUrl;
                redis.IncrementValue (pictureCount);
                redis.PrependItemToList (pictureRecentBuffer, picture);
                redis.TrimList (pictureRecentBuffer, 0, 10);
            }
        }