Dispose() public method

public Dispose ( ) : void
return void
Example #1
0
        public void CreatePackage(string packagePath, string inputPath, uint version = Package.CurrentVersion, CompressionMethod compression = CompressionMethod.None, bool fastCompression = true)
        {
            this.progressUpdate("Enumerating files ...", 0, 1);
            var package = new Package();

            EnumerateFiles(package, inputPath, inputPath);

            this.progressUpdate("Creating archive ...", 0, 1);
            var writer = new PackageWriter(package, packagePath);

            writer.writeProgress   += WriteProgressUpdate;
            writer.Version          = version;
            writer.Compression      = compression;
            writer.CompressionLevel = fastCompression ? LS.CompressionLevel.FastCompression : LS.CompressionLevel.DefaultCompression;
            writer.Write();
            writer.Dispose();
        }
Example #2
0
        public void CreatePackage(string packagePath, string inputPath, uint version = Package.CurrentVersion, CompressionMethod compression = CompressionMethod.None, bool fastCompression = true)
        {
            this.progressUpdate("Enumerating files ...", 0, 1);
            var package = new Package();
            EnumerateFiles(package, inputPath, inputPath);

            this.progressUpdate("Creating archive ...", 0, 1);
            var writer = new PackageWriter(package, packagePath);
            writer.writeProgress += WriteProgressUpdate;
            writer.Version = version;
            writer.Compression = compression;
            writer.CompressionLevel = fastCompression ? LS.CompressionLevel.FastCompression : LS.CompressionLevel.DefaultCompression;
            writer.Write();
            writer.Dispose();
        }