private void AddNamedItemNamespace() { GlobalScope scope = (GlobalScope) this.Scope.GetObject(); if (scope.isComponentScope) { scope = (GlobalScope) scope.GetParent(); } ScriptObject parent = scope.GetParent(); VsaNamedItemScope scope2 = new VsaNamedItemScope(this.GetObject(), parent, base.engine); scope.SetParent(scope2); scope2.SetParent(parent); }
private void AddNamedItemNamespace() { GlobalScope scope = (GlobalScope)this.Scope.GetObject(); if (scope.isComponentScope) { scope = (GlobalScope)scope.GetParent(); } ScriptObject parent = scope.GetParent(); VsaNamedItemScope scope2 = new VsaNamedItemScope(this.GetObject(), parent, base.engine); scope.SetParent(scope2); scope2.SetParent(parent); }
private void AddNamedItemNamespace() { GlobalScope current = (GlobalScope)this.Scope.GetObject(); //get the global scope object if (current.isComponentScope) { current = (GlobalScope)current.GetParent(); } ScriptObject parent = current.GetParent(); //this can be non null if the current scope is nested inside another VsaNamedItemScope namedItemNamespace = new VsaNamedItemScope(this.GetObject(), parent, this.engine); // insert into the prototype chain of the global scope object current.SetParent(namedItemNamespace); namedItemNamespace.SetParent(parent); }
private void AddNamedItemNamespace(){ GlobalScope current = (GlobalScope)this.Scope.GetObject(); //get the global scope object if (current.isComponentScope) current = (GlobalScope)current.GetParent(); ScriptObject parent = current.GetParent(); //this can be non null if the current scope is nested inside another VsaNamedItemScope namedItemNamespace = new VsaNamedItemScope(this.GetObject(), parent, this.engine); // insert into the prototype chain of the global scope object current.SetParent(namedItemNamespace); namedItemNamespace.SetParent(parent); }