CSharpTest.Net
ScriptArguments Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Processes Namespace > ScriptRunner Class : ScriptArguments Property

Glossary Item Box

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.NETCopy 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

Generated with Document! X 2011 by Innovasys