C# Class SharpAdbClient.AdbCommandLineClient

Provides methods for interacting with the adb.exe command line client.
Inheritance: IAdbCommandLineClient
Afficher le fichier Open project: ArduPilot/MissionPlanner

Méthodes publiques

Méthode Description
AdbCommandLineClient ( string adbPath ) : SharpAdbClient.Exceptions

Initializes a new instance of the AdbCommandLineClient class.

GetVersion ( ) : System.Version

Queries adb for its version number and checks it against AdbServer.RequiredAdbVersion.

IsValidAdbFile ( string adbPath ) : bool
StartServer ( ) : void

Starts the adb server by running the adb start-server command.

Méthodes protégées

Méthode Description
RunAdbProcess ( string command, List errorOutput, List standardOutput ) : void

Runs the adb.exe process, invoking a specific command, and reads the standard output and standard error output.

Use this command only for adb commands that return immediately, such as adb version. This operation times out after 5 seconds.

RunAdbProcessInner ( string command, List errorOutput, List standardOutput ) : int

Runs the adb.exe process, invoking a specific command, and reads the standard output and standard error output.

Use this command only for adb commands that return immediately, such as adb version. This operation times out after 5 seconds.

Private Methods

Méthode Description
GetVersionFromOutput ( List output ) : System.Version

Parses the output of the adb.exe version command and determines the adb version.

Method Details

AdbCommandLineClient() public méthode

Initializes a new instance of the AdbCommandLineClient class.
public AdbCommandLineClient ( string adbPath ) : SharpAdbClient.Exceptions
adbPath string /// The path to the adb.exe executable. ///
Résultat SharpAdbClient.Exceptions

GetVersion() public méthode

Queries adb for its version number and checks it against AdbServer.RequiredAdbVersion.
public GetVersion ( ) : System.Version
Résultat System.Version

IsValidAdbFile() public méthode

public IsValidAdbFile ( string adbPath ) : bool
adbPath string
Résultat bool

RunAdbProcess() protected méthode

Runs the adb.exe process, invoking a specific command, and reads the standard output and standard error output.

Use this command only for adb commands that return immediately, such as adb version. This operation times out after 5 seconds.

/// The process exited with an exit code other than 0. ///
protected RunAdbProcess ( string command, List errorOutput, List standardOutput ) : void
command string /// The adb.exe command to invoke, such as version or start-server. ///
errorOutput List /// A list in which to store the standard error output. Each line is added as a new entry. /// This value can be if you are not interested in the standard /// error. ///
standardOutput List /// A list in which to store the standard output. Each line is added as a new entry. /// This value can be if you are not interested in the standard /// output. ///
Résultat void

RunAdbProcessInner() protected méthode

Runs the adb.exe process, invoking a specific command, and reads the standard output and standard error output.

Use this command only for adb commands that return immediately, such as adb version. This operation times out after 5 seconds.

protected RunAdbProcessInner ( string command, List errorOutput, List standardOutput ) : int
command string /// The adb.exe command to invoke, such as version or start-server. ///
errorOutput List /// A list in which to store the standard error output. Each line is added as a new entry. /// This value can be if you are not interested in the standard /// error. ///
standardOutput List /// A list in which to store the standard output. Each line is added as a new entry. /// This value can be if you are not interested in the standard /// output. ///
Résultat int

StartServer() public méthode

Starts the adb server by running the adb start-server command.
public StartServer ( ) : void
Résultat void