public static ISaveLocation ToSaveLocation(this SaveLocationManifest manifest) { return(new SaveLocation(manifest.RecordGuid, manifest.SaveFormat, new DirectoryInfo(manifest.Directory), manifest.LocationGuid, manifest.LastModified)); }
public async Task <ISaveLocation> GetSaveLocationAsync(Guid saveLocationGuid) { string manifestPath = Path.Combine(this.SaveLocationRoot.FullName, saveLocationGuid.ToString(), ManifestFileName); if (!File.Exists(manifestPath)) { throw new FileNotFoundException(); } SaveLocationManifest manifest = JsonConvert.DeserializeObject <SaveLocationManifest>(await File.ReadAllTextAsync(manifestPath)); return(manifest.ToSaveLocation()); }