Esempio n. 1
0
        public async Task <ISaveLocation> CreateSaveLocationAsync(IGameRecord gameRecord, string saveType)
        {
            Guid saveGuid = Guid.NewGuid();

            DirectoryInfo locationRoot = this.SaveLocationRoot
                                         .CreateSubdirectory(saveGuid.ToString());
            var saveLocation = new SaveLocation(gameRecord.RecordId, saveType, locationRoot, saveGuid,
                                                DateTimeOffset.UtcNow);

            return(await this.UpdateSaveLocation(saveLocation));
        }
Esempio n. 2
0
 public IEnumerable <FileInfo> RetrieveTo(DirectoryInfo emulatorSaveDirectory)
 {
     return(SaveLocation.CopyAll(this.LocationRoot, emulatorSaveDirectory).ToList());
 }
Esempio n. 3
0
 public IEnumerable <FileInfo> PersistFrom(DirectoryInfo emulatorSaveDirectory)
 {
     this.LastModified = DateTime.UtcNow;
     return(SaveLocation.CopyAll(emulatorSaveDirectory, this.LocationRoot).ToList());
 }