/// <summary> /// 既定のコンストラクタ /// </summary> /// <param name="scriptEnv">スクリプト実行環境</param> public VariableStorage(ScriptConsole parent) : this() { if (parent == null) { throw new ArgumentNullException("parent", "'parent' cannot be null"); } this.Parent = parent; // Soncoleに登録されている関数を読み取り専用として環境に登録 FieldProperty readonlyProperty = new FieldProperty(); readonlyProperty.Readonly = true; foreach (string function in parent.GetFunctionNames()) { this.Declare(function, new RegisteredFunctionVariable(function), readonlyProperty); } }
public ScriptExecutionEnvironment(ScriptConsole console, VariableStorage variables) { this.Console = console; this.Variables = variables; }