public static SingleSourceHTTPDownloaderState LoadSingleSourceHTTPDownloaderState(string id) { SingleSourceHTTPDownloaderState?state = null; TransactedBinaryDataReader.Read($"{id}.state", Config.DataDir, r => { state = SingleSourceHTTPDownloaderStateFromBytes(r); }); if (state == null) { throw new IOException("Unable to read state: " + id); } return(state); }
public static void Save(MultiSourceDASHDownloadState state) { TransactedBinaryDataReader.Write($"{state.Id}.state", Config.DataDir, w => StateToBytes(state, w)); }
public static void Save(DualSourceHTTPDownloaderState state) { TransactedBinaryDataReader.Write($"{state.Id}.state", Config.DataDir, w => StateToBytes(state, w)); }