Ejemplo n.º 1
0
        /// <summary>
        /// Serializes a given match in it's own folder
        /// </summary>
        /// <param name="rec"></param>
        public static void SerializeRecommendation(RecModel rec)
        {
            string workingDir = WorkingDir + DIR_RECS + rec.ToString() + "\\";

            // Rec doesn't have his own data folder
            if (!Directory.Exists(workingDir))
            {
                CreateMatchFolder(workingDir);
            }

            DownloadPhotos(rec.Photos, workingDir);
            DownloadInstagramPhotos(rec.Instagram, workingDir);

            File.WriteAllText(workingDir + rec.Name.Unidecode() + EXT,
                              JsonConvert.SerializeObject(rec, Formatting.Indented));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Moves photos of recommendation from "Pending recommendations" to "Matches" directory
 /// </summary>
 /// <param name="rec"></param>
 public static bool MoveRecFromPendingToMatches(RecModel rec)
 {
     return(MoveRecPhotosToMatches(rec.ToString(), DIR_RECS_PENDING));
 }
Ejemplo n.º 3
0
 public static bool MoveRecToMatches(RecModel rec)
 {
     return(MoveRecPhotosToMatches(rec.ToString(), DIR_RECS));
 }