Example #1
0
 public static void RemoveFeelings(this Dictionary <string, List <string> > dictionary, PartyGoer partyGoer, string trackUri)
 {
     if (dictionary.ContainsKey(partyGoer.GetId()))
     {
         dictionary[partyGoer.GetId()].RemoveAll(p => p.Equals(trackUri));
     }
 }
Example #2
0
        public bool DoesUserLikeTrack(PartyGoer partyGoer, string trackUri)
        {
            if (_usersLikedTracks.ContainsKey(partyGoer.GetId()))
            {
                return(_usersLikedTracks[partyGoer.GetId()].Contains(trackUri));
            }

            return(false);
        }
Example #3
0
 public static List <string> GetUsersTracks(this Dictionary <string, List <string> > dictionary, PartyGoer partyGoer)
 {
     if (dictionary.ContainsKey(partyGoer.GetId()))
     {
         return(dictionary[partyGoer.GetId()]);
     }
     else
     {
         return(new List <string>());
     }
 }
Example #4
0
 public static void AddFeelings(this Dictionary <string, List <string> > dictionary, PartyGoer partyGoer, string trackUri)
 {
     if (dictionary.ContainsKey(partyGoer.GetId()))
     {
         dictionary[partyGoer.GetId()].TryAdd(trackUri);
     }
     else
     {
         dictionary.Add(partyGoer.GetId(), new List <string> {
             trackUri
         });
     }
 }