public bool Build(Script script = null) { if (_wscript != null) { _msc_compiler.Reset(); _wscriptEcho.Length = 0; } SetLanguage(script); if (script == null) { _wscript = new WScript(); } else { _wscript = new WScript(script.Path, script.Arguments); } _wscript.OnEcho += (m) => _wscriptEcho.AppendLine(m); _script = script; _msc_compiler.AddObject("WScript", _wscript, false); //_compiler.AddCode("Function IIf(Expression, TruePart, FalsePart)\r\nIf Expression Then IIf = truepart Else IIf = falsepart\r\nEnd Function\r\n"); if (script != null) { return(Execute(script.GetCode())); } return(true); }
public bool Compile(WScript wscript, Script script = null) { _wscript = wscript; if (_script != null) _compiler.Reset(); _script = script; _compiler.AddObject("WScript", wscript, true); _compiler.AddCode("Function IIf(Expression, TruePart, FalsePart)\r\nIf Expression Then IIf = truepart Else IIf = falsepart\r\nEnd Function\r\n"); if (script != null) return AddCode(script.GetCode()); return true; }
public bool Compile(WScript wscript, Script script = null) { _wscript = wscript; if (_script != null) { _compiler.Reset(); } _script = script; _compiler.AddObject("WScript", wscript, true); _compiler.AddCode("Function IIf(Expression, TruePart, FalsePart)\r\nIf Expression Then IIf = truepart Else IIf = falsepart\r\nEnd Function\r\n"); if (script != null) { return(AddCode(script.GetCode())); } return(true); }
public bool Build(Script script = null) { if (_wscript != null) { _msc_compiler.Reset(); _wscriptEcho.Length = 0; } SetLanguage(script); if (script == null) { _wscript = new WScript(); } else { _wscript = new WScript(script.Path, script.Arguments); } _wscript.OnEcho += (m) => _wscriptEcho.AppendLine(m); _script = script; _msc_compiler.AddObject("WScript", _wscript, false); //_compiler.AddCode("Function IIf(Expression, TruePart, FalsePart)\r\nIf Expression Then IIf = truepart Else IIf = falsepart\r\nEnd Function\r\n"); if (script != null) return Execute(script.GetCode()); return true; }