C# Class Nexus.Client.Games.InstallationPathAutoDetector

This task searched the user's computer for the specified installation path.
The task is given specific file names for which to search that indicate the installation path being sought.
Inheritance: ThreadedBackgroundTask
显示文件 Open project: NexusMods/NexusModManager-4.5

Public Methods

Method Description
Detect ( string p_strSearchFiles ) : void

Finds the installation path.

InstallationPathAutoDetector ( bool>.System p_fncConfirmFoundInstallationPath ) : System

A simple constructor that initializes the object with the given values.

Protected Methods

Method Description
DoWork ( object p_objArgs ) : object

The delegate that is called to start the backgound task.

SearchToDepth ( string p_strPath, string p_strSearchFiles, Int32 p_intMaxDepth, Int32 p_intDepth ) : string

This recursively searches the specified directory for the search files.

Method Details

Detect() public method

Finds the installation path.
public Detect ( string p_strSearchFiles ) : void
p_strSearchFiles string The files to search for when auto-detecting.
return void

DoWork() protected method

The delegate that is called to start the backgound task.
protected DoWork ( object p_objArgs ) : object
p_objArgs object the files to search for.
return object

InstallationPathAutoDetector() public method

A simple constructor that initializes the object with the given values.
public InstallationPathAutoDetector ( bool>.System p_fncConfirmFoundInstallationPath ) : System
p_fncConfirmFoundInstallationPath bool>.System The delegate to call to confirm if a found path /// is correct.
return System

SearchToDepth() protected method

This recursively searches the specified directory for the search files.
protected SearchToDepth ( string p_strPath, string p_strSearchFiles, Int32 p_intMaxDepth, Int32 p_intDepth ) : string
p_strPath string The path of the direcotry to recursively search.
p_strSearchFiles string The files to search for when auto-detecting.
p_intMaxDepth System.Int32 The depth to hich the search for the search files.
p_intDepth System.Int32 The current search depth.
return string