Click or drag to resize

Command Class

Defines methods related to command line operations
Inheritance Hierarchy
SystemObject
  GSF.ConsoleCommand

Namespace: GSF.Console
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.253-beta+ffb7163c9e3b771705bc5b9aa3f09870f2cb9e2c
Syntax
public static class Command
View Source

The Command type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberCustomProcessStartInfo Customizable Command.ProcessStartInfo to set prior to Creating or Executing the CommandProcess. The original Process.StartInfo defaults are used when Command.CustomProcessStartInfo is null. Command.CustomProcessStartInfo is null to be consistent with earlier implementations. Example to create a Command.CustomProcessStartInfo with Gemstone default StartInfo but without creating a Window: GSF.Core.Console.Command.CustomProcessStartInfo = new() { UseShellExecute = false, RedirectStandardError = true, RedirectStandardOutput = true, CreateNoWindow = true };
Top
Methods
 NameDescription
Public methodStatic memberExecute(String, String, Int32) Executes a command line operation and returns its standard output and exit code or throws an exception with the standard error.
Public methodStatic memberExecute(String, String, String, String, Int32) Executes a command line operation and returns true if there was no standard error reported.
Public methodStatic memberExecute(String, String, String, String, Boolean, Int32, Int32) Executes a command line operation and returns true if there was no standard error reported.
Public Extension MethodShellDecode Decodes a command line parameter previously encoded by ShellEncode(String).
Public Extension MethodShellEncode Shell encodes a command line parameter by converting "\" to "\\".
Top
See Also