'Declaration Public ReadOnly Property PendingActionCount As Long
'Usage Dim instance As ZipArchive Dim value As Long value = instance.PendingActionCount
public long PendingActionCount {get;}
'Declaration Public ReadOnly Property PendingActionCount As Long
'Usage Dim instance As ZipArchive Dim value As Long value = instance.PendingActionCount
public long PendingActionCount {get;}
A pending action typically refers to a batch update started by a call to ZipArchive.BeginUpdate. It can also refer to open streams on one of the archive's items. The count is incremented when an action is started and decremented when that action is completed. So methods like ZipArchive.BeginUpdate, ZippedFile.OpenRead, and ZippedFile.OpenWrite increment the count. Methods like ZipArchive.EndUpdate and Stream.Close decrement the count.
When the count is at zero, it means that all batched updates on the archive have been written and that the archive is rebuilt and is now in an unmodified state.
In most cases, for optimization reasons, the archive is only rebuilt when the pending action count reaches zero, typically when ZipArchive.EndUpdate is called.
This property is meant as a debugging aid to make sure no actions are incomplete when an application has finished modifying an archive. For example, a call to ZipArchive.EndUpdate might be expected to rebuild the archive. But if a Stream from a ZippedFile is left open during the update, ZipArchive.EndUpdate will do
nothing since the pending action count won't reach zero with the call.
If this property returns a value greater than zero after a call to the last nested ZipArchive.EndUpdate, it usually means there is a logic error in the application and not all resources have been returned to the archive. This will lead to corrupted archives.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2