Search Results for

    Show / Hide Table of Contents

    Class ScriptEnvironment

    Contains the runtime information of the application environment for the script.

    Inheritance
    System.Object
    ScriptEnvironment
    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: VMS.TPS.Common.Model.API
    Assembly: VMS.TPS.Common.Model.API.dll
    Syntax
    public sealed class ScriptEnvironment

    Constructors

    ScriptEnvironment(String, IEnumerable<IApplicationScript>, Action<Assembly, Object, Window, Object>)

    Provides scripts access to the application environment. A ScriptEnvironment instance is given as an optional parameter in the Execute function of the script. The script itself does not instantiate the ScriptEnvironment.

    Declaration
    [Obsolete]
    public ScriptEnvironment(string appName, IEnumerable<IApplicationScript> scripts, Action<Assembly, object, Window, object> scriptExecutionEngine)
    Parameters
    Type Name Description
    System.String appName

    The application name.

    System.Collections.Generic.IEnumerable<VMS.TPS.Common.Model.IApplicationScript> scripts

    A list of all scripts known by the application.

    System.Action<System.Reflection.Assembly, System.Object, System.Windows.Window, System.Object> scriptExecutionEngine

    The execution engine for executing a script from another script.

    ScriptEnvironment(String, IEnumerable<IApplicationScript>, IEnumerable<IApplicationPackage>, Action<Assembly, Object, Window, Object>)

    Provides scripts access to the application environment. A ScriptEnvironment instance is given as an optional parameter in the Execute function of the script. The script itself does not instantiate the ScriptEnvironment.

    Declaration
    public ScriptEnvironment(string appName, IEnumerable<IApplicationScript> scripts, IEnumerable<IApplicationPackage> packages, Action<Assembly, object, Window, object> scriptExecutionEngine)
    Parameters
    Type Name Description
    System.String appName

    The application name.

    System.Collections.Generic.IEnumerable<VMS.TPS.Common.Model.IApplicationScript> scripts

    A list of all scripts known by the application.

    System.Collections.Generic.IEnumerable<VMS.TPS.Common.Model.IApplicationPackage> packages

    A list of all packages known by the application.

    System.Action<System.Reflection.Assembly, System.Object, System.Windows.Window, System.Object> scriptExecutionEngine

    The execution engine for executing a script from another script.

    Properties

    ApiVersionInfo

    The version number of Eclipse Scripting API.

    Declaration
    public string ApiVersionInfo { get; }
    Property Value
    Type Description
    System.String

    ApplicationName

    The name of the active application.

    Declaration
    public string ApplicationName { get; }
    Property Value
    Type Description
    System.String

    Packages

    Retrieves a list of all packages known by the application.

    Declaration
    public IEnumerable<ApplicationPackage> Packages { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ApplicationPackage>

    Scripts

    Retrieves a list of all scripts known by the application.

    Declaration
    public IEnumerable<ApplicationScript> Scripts { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ApplicationScript>

    VersionInfo

    The version number of Eclipse.

    Declaration
    public string VersionInfo { get; }
    Property Value
    Type Description
    System.String

    Methods

    ExecuteScript(Assembly, ScriptContext, Window)

    Executes an other script from script. This allows a script to be used for launching other scripts. Without using this special method, the system would be unaware of the other script, and thus could not save the correct script logs.

    Declaration
    public void ExecuteScript(Assembly scriptAssembly, ScriptContext scriptContext, Window window)
    Parameters
    Type Name Description
    System.Reflection.Assembly scriptAssembly

    The other script assembly. The assembly must have a location.

    ScriptContext scriptContext

    The script context that was passed to the executing script.

    System.Windows.Window window

    The script window. This is an optional parameter, can be null.

    In This Article
    Back to top