C# 클래스 Nexus.Client.Util.ThreadSafeSevenZipExtractor

A wrapper for the SevenZipExtractor class that makes using it thread safe.
상속: IDisposable
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void

Ensures all used resources are released.

This terminates the thread upon which the SevenZipExtractor was created.

ExtractFile ( Int32 p_intIndex, Stream p_stmFile ) : void

Extracts the specified file to the given stream.

This wrapper property ensures the operation executes on the same thread in which the SevenZipExtractor was created.

ThreadSafeSevenZipExtractor ( Stream p_stmArchive ) : System

Creates a thread safe extractor for the given stream.

ThreadSafeSevenZipExtractor ( string p_strPath ) : System

Creates a thread safe extractor for the file at the given path.

보호된 메소드들

메소드 설명
ExecuteAction ( System.Action p_actAction ) : void

Executes the given action.

This method: 1) Enqueues the action in the work queue. 2) Notifies the extraction thread that there is work to do. 3) Waits to be notified that the action has completed. 4) Throws any exception that was raised while executing the action.

Init ( ) : void

Initializes the thread safe extractor.

RunThread ( ) : void

The run method of the thread on which the SevenZipExtractor is created.

This method creates a SevenZipExtractor and then watches for events to execute. Other methods signal the thread that an action needs to be taken, and this thread executes said actions.

메소드 상세

Dispose() 공개 메소드

Ensures all used resources are released.
This terminates the thread upon which the SevenZipExtractor was created.
public Dispose ( ) : void
리턴 void

ExecuteAction() 보호된 메소드

Executes the given action.
This method: 1) Enqueues the action in the work queue. 2) Notifies the extraction thread that there is work to do. 3) Waits to be notified that the action has completed. 4) Throws any exception that was raised while executing the action.
protected ExecuteAction ( System.Action p_actAction ) : void
p_actAction System.Action The action to get the extractor to execute.
리턴 void

ExtractFile() 공개 메소드

Extracts the specified file to the given stream.
This wrapper property ensures the operation executes on the same thread in which the SevenZipExtractor was created.
public ExtractFile ( Int32 p_intIndex, Stream p_stmFile ) : void
p_intIndex System.Int32 The index of the file to extract from the archive.
p_stmFile Stream The stream to which to extract the file.
리턴 void

Init() 보호된 메소드

Initializes the thread safe extractor.
protected Init ( ) : void
리턴 void

RunThread() 보호된 메소드

The run method of the thread on which the SevenZipExtractor is created.
This method creates a SevenZipExtractor and then watches for events to execute. Other methods signal the thread that an action needs to be taken, and this thread executes said actions.
protected RunThread ( ) : void
리턴 void

ThreadSafeSevenZipExtractor() 공개 메소드

Creates a thread safe extractor for the given stream.
public ThreadSafeSevenZipExtractor ( Stream p_stmArchive ) : System
p_stmArchive Stream The stream for which to create an extractor.
리턴 System

ThreadSafeSevenZipExtractor() 공개 메소드

Creates a thread safe extractor for the file at the given path.
public ThreadSafeSevenZipExtractor ( string p_strPath ) : System
p_strPath string The path to the file for which to create an extractor.
리턴 System