ZipArchive Constructor (Stream, ZipArchiveMode)

Initializes a new instance of ZipArchive on the given stream in the specified mode.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

public ZipArchive(
	Stream stream,
	ZipArchiveMode mode
)

Parameters

stream
Type: System.IO.Stream

The input or output stream.

mode
Type: Microsoft.TeamFoundation.Framework.Server.ZipArchiveMode

See the description of the ZipArchiveMode enum. Read requires the stream to support reading, Create requires the stream to support writing, and Update requires the stream to support reading, writing, and seeking.

ExceptionCondition
ArgumentException

The stream is already closed, or else mode is incompatible with the capabilities of the stream.

ArgumentNullException

The stream is null.

ArgumentOutOfRangeException

mode specified an invalid value.

InvalidDataException

The contents of the stream could not be interpreted as a Zip file, or else mode is Update and an entry is missing from the archive or is corrupted and cannot be read, or else mode is Update and an entry is too large to fit into memory.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft