ICSharpCode.SharpZipLib.Zip.ZipFile.Create C# (CSharp) Метод

Create() публичный статический Метод

Create a new ZipFile whose data will be stored on a stream.
is null doesnt support writing.
public static Create ( Stream outStream ) : ZipFile
outStream Stream The stream providing data storage.
Результат ZipFile
        public static ZipFile Create(Stream outStream) {
            if (outStream==null) {
                throw new ArgumentNullException("outStream");
            }

            if (!outStream.CanWrite) {
                throw new ArgumentException("Stream is not writeable", "outStream");
            }

            if (!outStream.CanSeek) {
                throw new ArgumentException("Stream is not seekable", "outStream");
            }

            var result=new ZipFile();
            result.baseStream_=outStream;
            return result;
        }

Same methods

ZipFile::Create ( string fileName ) : ZipFile

Usage Example

Пример #1
0
        ZipFile(string filename, IReadWritePackage parent)
        {
            pkgStream = new MemoryStream();

            Name   = filename;
            Parent = parent;
            pkg    = SZipFile.Create(pkgStream);
        }
All Usage Examples Of ICSharpCode.SharpZipLib.Zip.ZipFile::Create