Пример #1
0
            public IDisposable SetDataProvider(ZipArchive dataArchive)
            {
                var backup  = _extraDataProvider;
                var created = new ExtraDataProvider(dataArchive);

                _extraDataProvider = created;
                return(new ActionAsDisposable(() => {
                    created.Dispose();
                    _extraDataProvider = backup;
                }));
            }
Пример #2
0
            public IDisposable SetDataProvider(string jsonFilename)
            {
                var backup  = _extraDataProvider;
                var created = new ExtraDataProvider(jsonFilename);

                _extraDataProvider = created;
                return(new ActionAsDisposable(() => {
                    created.Dispose();
                    _extraDataProvider = backup;
                }));
            }