CSharpTest.Net
ScriptEngine.Language Enumeration
Example  See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Processes Namespace : ScriptEngine.Language Enumeration

Glossary Item Box

Defines the languages we know how to run, or 'Other' when user-defined

Syntax

Visual Basic (Declaration) 
Public Enum ScriptEngine.Language 
   Inherits System.Enum
C# 
public enum ScriptEngine.Language : System.Enum 

Members

MemberDescription
Cmd.CMD Shell Script
CSharp.CS C# Program
ExeThe script is an executable's path
JScript.JS Javascript file
PowerShellPowerShell (v2, or v1)
VBNetVisual Basic .Net Program
VBScript.VBS VBScript file

Example

Library/Library.Test/TestScriptRunner.cs

C#Copy Code
using (TempFile file = TempFile.FromExtension(".exe"))
using (ScriptRunner runner = new ScriptRunner(ScriptEngine.Language.Exe, file.TempPath))
{
    Assert.AreEqual(ScriptEngine.Language.Exe, runner.ScriptEngine.ScriptType);
    Assert.AreEqual(file.TempPath, runner.ScriptEngine.Executable);
    Assert.IsFalse(File.Exists(runner.ScriptFile));
}
VB.NETCopy Code
Using file As TempFile = TempFile.FromExtension(".exe")
    Using runner As New ScriptRunner(ScriptEngine.Language.Exe, file.TempPath)
        Assert.AreEqual(ScriptEngine.Language.Exe, runner.ScriptEngine.ScriptType)
        Assert.AreEqual(file.TempPath, runner.ScriptEngine.Executable)
        Assert.IsFalse(File.Exists(runner.ScriptFile))
    End Using
End Using

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         CSharpTest.Net.Processes.ScriptEngine.Language

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys