Ejemplo n.º 1
0
        private void LoadCompressedCatalog(string catalogPath)
        {
            _isDefaultLocation = false;

            FileStream inputStream = null;
            GZipStream zipStream   = null;

            try
            {
                inputStream = new FileStream(catalogPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
                zipStream   = new GZipStream(inputStream, CompressionMode.Decompress);

                _dataset = new CatalogDataset();
                _dataset.ReadXml(zipStream);

                MigrateDataToLatestVersion();
            }
            finally
            {
                if (zipStream != null)
                {
                    zipStream.Close();
                }
                if (inputStream != null)
                {
                    inputStream.Close();
                }
            }
        }
Ejemplo n.º 2
0
        private void LoadCompressedCatalog(string catalogPath)
        {
            _isDefaultLocation = false;

            FileStream inputStream = null;
            GZipStream zipStream = null;

            try
            {
                inputStream = new FileStream(catalogPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
                zipStream = new GZipStream(inputStream, CompressionMode.Decompress);

                _dataset = new CatalogDataset();
                _dataset.ReadXml(zipStream);

                MigrateDataToLatestVersion();
            }
            finally
            {
                if (zipStream != null) zipStream.Close();
                if (inputStream != null) inputStream.Close();
            }
        }
Ejemplo n.º 3
0
 private void LoadTemplateCatalog(string catalogPath)
 {
     _isDefaultLocation = false;
     _dataset = new CatalogDataset();
     _dataset.ReadXml(catalogPath);
 }
Ejemplo n.º 4
0
 private void LoadTemplateCatalog(string catalogPath)
 {
     _isDefaultLocation = false;
     _dataset           = new CatalogDataset();
     _dataset.ReadXml(catalogPath);
 }