Search Results for

    Show / Hide Table of Contents

    Class CommandShellManager

    The shell manager is the root of the shell lib framework.

    Inheritance
    System.Object
    CommandShellManager
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Simplic.CommandShell
    Assembly: Simplic.CommandShell.dll
    Syntax
    public class CommandShellManager

    Properties

    | Improve this Doc View Source

    ActiveShellContext

    Get the active shell context

    Declaration
    public CommandShellContext ActiveShellContext { get; }
    Property Value
    Type Description
    CommandShellContext
    | Improve this Doc View Source

    Singleton

    Singleton access to the shell manager instance

    Declaration
    public static CommandShellManager Singleton { get; }
    Property Value
    Type Description
    CommandShellManager

    Methods

    | Improve this Doc View Source

    ActivateLastShellContext()

    Move to last shell context. For example for nested contexts and exit commands

    Declaration
    public void ActivateLastShellContext()
    | Improve this Doc View Source

    ActivateShellContext(String)

    Activate a shell context by its name, if the shell context is already activated, nothing happens.

    Declaration
    public void ActivateShellContext(string contextName)
    Parameters
    Type Name Description
    System.String contextName

    Name of the shell context

    | Improve this Doc View Source

    CoutActivatedShellCotnexts()

    Cound the active shell contexts

    Declaration
    public int CoutActivatedShellCotnexts()
    Returns
    Type Description
    System.Int32

    Number of items

    | Improve this Doc View Source

    CreateShellContext(String)

    Create shell context, if it is the first shell context, it will be activated directly

    Declaration
    public CommandShellContext CreateShellContext(string contextName)
    Parameters
    Type Name Description
    System.String contextName

    Name of the context

    Returns
    Type Description
    CommandShellContext

    Instance if the shell context

    | Improve this Doc View Source

    Execute(String, out Boolean)

    Execute a shell command

    Declaration
    public string Execute(string command, out bool errorOccured)
    Parameters
    Type Name Description
    System.String command

    Command line content

    System.Boolean errorOccured

    Out parameter which defines wether an error occured

    Returns
    Type Description
    System.String

    Return-Message of the execute method

    | Improve this Doc View Source

    ExecuteArgs(String, String[], out Boolean)

    Execute program arguments as a shell command

    Declaration
    public string ExecuteArgs(string cmdName, string[] args, out bool errorOccured)
    Parameters
    Type Name Description
    System.String cmdName

    Command name

    System.String[] args

    Arguments

    System.Boolean errorOccured

    Out parameter which defines wether an error occured

    Returns
    Type Description
    System.String

    Result of the cmd

    | Improve this Doc View Source

    ExecuteArgs(String[], out Boolean)

    Executes a program based on program args Command included

    Declaration
    public string ExecuteArgs(string[] args, out bool errorOccured)
    Parameters
    Type Name Description
    System.String[] args

    1:1 args program parameter

    System.Boolean errorOccured

    Out parameter which defines wether an error occured

    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    ExecuteFile(String, Boolean, out Boolean)

    Execute all commands in a file

    Declaration
    public string ExecuteFile(string fileName, bool continueOnError, out bool errorOccured)
    Parameters
    Type Name Description
    System.String fileName

    Path to the file

    System.Boolean continueOnError

    Continues if an error occurse

    System.Boolean errorOccured

    Out parameter which defines wether an error occured

    Returns
    Type Description
    System.String

    Result-String

    | Improve this Doc View Source

    ExecuteMultiline(String, Boolean, out Boolean)

    Execute multiple commands

    Declaration
    public string ExecuteMultiline(string commands, bool continueOnError, out bool errorOccured)
    Parameters
    Type Name Description
    System.String commands

    String with commands

    System.Boolean continueOnError

    Continues if an error occurse

    System.Boolean errorOccured

    Out parameter which defines wether an error occured

    Returns
    Type Description
    System.String

    Result-String

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx