Changeset 11937 for stable/HeuristicLab.Scripting
- Timestamp:
- 02/06/15 12:44:09 (9 years ago)
- Location:
- stable
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Scripting/3.3/Scripts/CSharp/CSharpScript.cs
r11787 r11937 102 102 OnScriptExecutionStarted(); 103 103 compiledScript.Execute(VariableStore); 104 } catch (ThreadAbortException) {105 // the execution was cancelled by the user106 104 } catch (Exception e) { 107 105 ex = e; 108 106 } finally { 107 scriptThread = null; 109 108 OnScriptExecutionFinished(ex); 110 109 } … … 115 114 116 115 public virtual void Kill() { 117 if (scriptThread .IsAlive)118 116 if (scriptThread == null) return; 117 scriptThread.Abort(); 119 118 } 120 119 -
stable/HeuristicLab.Scripting/3.3/Scripts/Templates/CSharpScriptTemplate.cs
r11787 r11937 1 1 // use 'vars' to access variables in the script's variable store (e.g. vars.x = 5) 2 // use 'vars[string]' to access variables via runtime strings (e.g. vars[" "x""] = 5)2 // use 'vars[string]' to access variables via runtime strings (e.g. vars["x"] = 5) 3 3 // use 'vars.Contains(string)' to check if a variable exists 4 4 // use 'vars.Clear()' to remove all variables -
stable/HeuristicLab.Scripting/3.3/Variables.cs
r11154 r11937 6 6 public class Variables : DynamicObject, IEnumerable<KeyValuePair<string, object>> { 7 7 private readonly VariableStore variableStore; 8 9 public IEnumerable<string> Keys { 10 get { return variableStore.Keys; } 11 } 12 13 public IEnumerable<object> Values { 14 get { return variableStore.Values; } 15 } 8 16 9 17 public Variables(VariableStore variableStore) {
Note: See TracChangeset
for help on using the changeset viewer.