Return teh arguments to pass to script engine exe
Syntax
Visual Basic (Declaration) | |
---|
Public ReadOnly Property ScriptArguments As String() |
C# | |
---|
public string[] ScriptArguments {get;} |
Example
Library/Library.Test/TestScriptRunner.cs
C# | Copy Code |
---|
using (ScriptRunner runner = new ScriptRunner(ScriptEngine.Language.Cmd, "@ECHO From CMD.exe"))
{
Assert.AreEqual(ScriptEngine.Language.Cmd, runner.ScriptEngine.ScriptType);
Assert.IsTrue(File.Exists(runner.ScriptFile));
Assert.AreEqual("@ECHO From CMD.exe", File.ReadAllText(runner.ScriptFile));
Assert.AreEqual("/C " + runner.ScriptFile, String.Join(" ", runner.ScriptArguments));
} |
VB.NET | Copy Code |
---|
Using runner As New ScriptRunner(ScriptEngine.Language.Cmd, "@ECHO From CMD.exe")
Assert.AreEqual(ScriptEngine.Language.Cmd, runner.ScriptEngine.ScriptType)
Assert.IsTrue(File.Exists(runner.ScriptFile))
Assert.AreEqual("@ECHO From CMD.exe", File.ReadAllText(runner.ScriptFile))
Assert.AreEqual("/C " + runner.ScriptFile, [String].Join(" ", runner.ScriptArguments))
End Using |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also