private bool TryCompile(string script) { string err; if (script == string.Empty) { DiagTB.Text = "No script code to compile"; return(false); } ScriptRunner.CompileScript(script, out err); if (err == string.Empty) { DiagTB.Text = $"Successful compile at: {DateTime.Now}"; return(true); } DiagTB.Text = "Compile Errors:\r\n" + err; return(false); }
public CompiledExclusionRule(RuleAppliesTo appliesTo, string scriptCode) { this.AppliesTo = appliesTo; this.CompiledCode = ScriptRunner.CompileScript(scriptCode, out compileErrors); }