/// <summary> /// ImportAll Method /// </summary> /// <remarks> /// Import all variables of the scope into this scope. /// </remarks> public void ImportAll(PyScope scope) { int result = Runtime.PyDict_Update(variables, scope.variables); if (result < 0) { throw new PythonException(); } }
/// <summary> /// ImportAll Method /// </summary> /// <remarks> /// Import all variables of the scope into this scope. /// </remarks> public void ImportAll(PyScope scope) { int result = Runtime.PyDict_Update(VarsRef, scope.VarsRef); if (result < 0) { throw new PythonException(); } }
/// <summary> /// Remove Method /// </summary> /// <remarks> /// remove the scope from this manager. /// </remarks> public void Remove(PyScope scope) { NamedScopes.Remove(scope.Name); }
/// <summary> /// Get Method /// </summary> /// <remarks> /// Try to find the scope in this manager. /// </remarks> public bool TryGet(string name, out PyScope scope) { return(NamedScopes.TryGetValue(name, out scope)); }
/// <summary> /// Import method /// </summary> /// <remarks> /// Import a scope as a variable of given name. /// </remarks> public void Import(PyScope scope, string asname) { this.Set(asname, scope.obj); }
/// <summary> /// Import method /// </summary> /// <remarks> /// Import a scope as a variable of given name. /// </remarks> public void Import(PyScope scope, string asname) { this.SetPyValue(asname, scope.obj.Handle); }