本文整理汇总了C#中System.IO.Compression.ZipArchive.AcquireArchiveStream方法的典型用法代码示例。如果您正苦于以下问题:C# ZipArchive.AcquireArchiveStream方法的具体用法?C# ZipArchive.AcquireArchiveStream怎么用?C# ZipArchive.AcquireArchiveStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.Compression.ZipArchive
的用法示例。
在下文中一共展示了ZipArchive.AcquireArchiveStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ZipArchiveEntry
//Initializes new entry
internal ZipArchiveEntry(ZipArchive archive, String entryName)
{
_archive = archive;
_originallyInArchive = false;
_diskNumberStart = 0;
_versionMadeByPlatform = CurrentZipPlatform;
_versionMadeBySpecification = ZipVersionNeededValues.Default;
_versionToExtract = ZipVersionNeededValues.Default; //this must happen before following two assignment
_generalPurposeBitFlag = 0;
CompressionMethod = CompressionMethodValues.Deflate;
_lastModified = DateTimeOffset.Now;
_compressedSize = 0; //we don't know these yet
_uncompressedSize = 0;
_offsetOfLocalHeader = 0;
_storedOffsetOfCompressedData = null;
_crc32 = 0;
_compressedBytes = null;
_storedUncompressedData = null;
_currentlyOpenForWrite = false;
_everOpenedForWrite = false;
_outstandingWriteStream = null;
FullName = entryName;
_cdUnknownExtraFields = null;
_lhUnknownExtraFields = null;
_fileComment = null;
_compressionLevel = null;
if (_storedEntryNameBytes.Length > UInt16.MaxValue)
throw new ArgumentException(SR.EntryNamesTooLong);
//grab the stream if we're in create mode
if (_archive.Mode == ZipArchiveMode.Create)
{
_archive.AcquireArchiveStream(this);
}
}