public IDisposable SetDataProvider(ZipArchive dataArchive) { var backup = _extraDataProvider; var created = new ExtraDataProvider(dataArchive); _extraDataProvider = created; return(new ActionAsDisposable(() => { created.Dispose(); _extraDataProvider = backup; })); }
public IDisposable SetDataProvider(string jsonFilename) { var backup = _extraDataProvider; var created = new ExtraDataProvider(jsonFilename); _extraDataProvider = created; return(new ActionAsDisposable(() => { created.Dispose(); _extraDataProvider = backup; })); }