Пример #1
0
 void SaveRatings()
 {
     using (StreamWriter writer = new StreamWriter("../../../../data/user-ratings-" + current_user_id))
     {
         foreach (KeyValuePair <int, double> r in ratings)
         {
             writer.WriteLine("{0}\t{1}\t{2}",
                              user_mapping.ToOriginalID(current_user_id),
                              item_mapping.ToOriginalID(r.Key),
                              r.Value.ToString(CultureInfo.InvariantCulture));
         }
     }
 }