public static VariablePool CreatePool(Address _pool_address) { Scope scope = _pool_address.ToScope(); List <string> levels = scope.ToList(); levels.Reverse(); VariablePool runtimePool = RuntimeEngine.VariablePool; foreach (string level in levels) { if (!runtimePool.HasPool(level)) { runtimePool.CreatePool(level); } runtimePool = runtimePool.GetPool(level); } return(runtimePool); }
public static VariablePool GetPool(Address addr) { string[] _nodes = addr.FullPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); VariablePool varpool = RuntimeEngine.VariablePool; int i = 0; if (_nodes.Length >= 1) { if (_nodes[0].Equals("$SYSTEM$_Runtime.Pool@" + typeof(RuntimeEngine).Name)) { i = 1; } } for (; i < _nodes.Length; i++) { varpool = varpool.GetPool(_nodes[i]); } return(varpool); }