• Api Documentation
  • Source Code
  • SharpSevenZip.EventArguments
  • ExtractFileCallbackArgs
Search Results for

    Show / Hide Table of Contents
    • SharpSevenZip
      • ArchiveFileInfo
      • ArchiveProperty
      • CompressionLevel
      • CompressionMethod
      • CompressionMode
      • EventSynchronizationStrategy
      • ExtractFileCallback
      • ICancellable
      • InArchiveFormat
      • LibraryFeature
      • OperationResult
      • OutArchiveFormat
      • SfxModule
      • SharpSevenZipArchiveFormat
      • SharpSevenZipBase
      • SharpSevenZipCompressor
      • SharpSevenZipExtractor
      • SharpSevenZipSfx
      • StreamWithAttributes
      • ZipEncryptionMethod
    • SharpSevenZip.EventArguments
      • ExtractFileCallbackArgs
      • ExtractFileCallbackReason
      • FileInfoEventArgs
      • FileNameEventArgs
      • FileOverwriteEventArgs
      • IntEventArgs
      • OpenEventArgs
      • PercentDoneEventArgs
      • ProgressEventArgs
    • SharpSevenZip.Exceptions
      • CompressionFailedException
      • ExtractionFailedException
      • LzmaException
      • SharpSevenZipArchiveException
      • SharpSevenZipCompressionFailedException
      • SharpSevenZipException
      • SharpSevenZipExtractionFailedException
      • SharpSevenZipInvalidFileNamesException
      • SharpSevenZipLibraryException
      • SharpSevenZipSfxValidationException
    • SharpSevenZip.Lzma
      • LzmaDecodeStream
      • LzmaEncodeStream
    • SharpSevenZip.Sdk
      • CoderPropId
      • ICodeProgress
      • ICoder
    • SharpSevenZip.Sdk.Compression.Lzma
      • Decoder
      • Encoder

    Class ExtractFileCallbackArgs

    The arguments passed to ExtractFileCallback.

    Inheritance
    object
    EventArgs
    ExtractFileCallbackArgs
    Inherited Members
    EventArgs.Empty
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SharpSevenZip.EventArguments
    Assembly: SharpSevenZip.dll
    Syntax
    public class ExtractFileCallbackArgs : EventArgs
    Remarks

    For each file, ExtractFileCallback is first called with Reason set to Start. If the callback chooses to extract the file data by setting ExtractToFile or ExtractToStream, the callback will be called a second time with Reason set to Done or Failure to allow for any cleanup task like closing the stream.

    Constructors

    | Edit this page View Source

    ExtractFileCallbackArgs(ArchiveFileInfo)

    Initializes a new instance of the ExtractFileCallbackArgs class.

    Declaration
    public ExtractFileCallbackArgs(ArchiveFileInfo archiveFileInfo)
    Parameters
    Type Name Description
    ArchiveFileInfo archiveFileInfo

    The information about file in the archive.

    Properties

    | Edit this page View Source

    ArchiveFileInfo

    Information about file in the archive.

    Declaration
    public ArchiveFileInfo ArchiveFileInfo { get; }
    Property Value
    Type Description
    ArchiveFileInfo

    Information about file in the archive.

    | Edit this page View Source

    CancelExtraction

    Gets or sets a value indicating whether to cancel the extraction.

    Declaration
    public bool CancelExtraction { get; set; }
    Property Value
    Type Description
    bool

    true to cancel the extraction; false to continue. The default is false.

    | Edit this page View Source

    Exception

    The exception that occurred during extraction.

    Declaration
    public Exception? Exception { get; set; }
    Property Value
    Type Description
    Exception

    The _Exception.

    Remarks

    If the callback is called with Reason set to Failure, this member contains the _Exception that occurred. The default behavior is to rethrow the _Exception after return of the callback. However the callback can set Exception to null to swallow the _Exception and continue extraction with the next file.

    | Edit this page View Source

    ExtractToFile

    Gets or sets whether and where to extract the file.

    Declaration
    public string? ExtractToFile { get; set; }
    Property Value
    Type Description
    string

    The path where to extract the file to.

    Remarks

    If ExtractToStream is set, this mmember will be ignored.

    | Edit this page View Source

    ExtractToStream

    Gets or sets whether and where to extract the file.

    Declaration
    public Stream? ExtractToStream { get; set; }
    Property Value
    Type Description
    Stream

    The the extracted data is written to.

    Remarks

    If both this member and ExtractToFile are null (the defualt), the file will not be extracted and the callback will be be executed a second time with the Reason set to Done or Failure.

    | Edit this page View Source

    ObjectData

    Gets or sets any data that will be preserved between the Start callback call and the Done or Failure calls.

    Declaration
    public object? ObjectData { get; set; }
    Property Value
    Type Description
    object

    The data.

    | Edit this page View Source

    Reason

    The reason for calling ExtractFileCallback.

    Declaration
    public ExtractFileCallbackReason Reason { get; }
    Property Value
    Type Description
    ExtractFileCallbackReason

    The reason.

    Remarks

    If neither ExtractToFile nor ExtractToStream is set, ExtractFileCallback will not be called after Start.

    • Edit this page
    • View Source
    In this article
    • Constructors
      • ExtractFileCallbackArgs(ArchiveFileInfo)
    • Properties
      • ArchiveFileInfo
      • CancelExtraction
      • Exception
      • ExtractToFile
      • ExtractToStream
      • ObjectData
      • Reason
    Back to top Copyright (C) Markovtsev Vadim 2009, 2010, Jérémy Ansel 2024