Inheritance: ScriptObject, IActivationObject
コード例 #1
0
 public override MemberInfo[] GetMember(String name, BindingFlags bindingAttr)
 {
     MemberInfo[] members = null;
     if (!this.recursive && this.reflectObj != null)
     {
         this.recursive = true;
         try{
             ISite2 site;
             if (!this.reflectObj.GetType().IsCOMObject || (site = this.engine.Site as ISite2) == null)
             {
                 members = ScriptObject.WrapMembers(this.reflectObj.GetMember(name, bindingAttr), this.namedItem);
             }
             else if ((members = VsaNamedItemScope.GetAndWrapMember(this.reflectObj, this.namedItem, name, bindingAttr)) == null)
             {
                 Object[] parentChain = site.GetParentChain(this.reflectObj);
                 if (parentChain != null)
                 {
                     int parentChainLength = parentChain.Length;
                     for (int i = 0; i < parentChainLength; i++)
                     {
                         IReflect parent = parentChain[i] as IReflect;
                         if (parent != null && (members = VsaNamedItemScope.GetAndWrapMember(parent, parent, name, bindingAttr)) != null)
                         {
                             break;
                         }
                     }
                 }
             }
         }finally{
             this.recursive = false;
         }
     }
     return(members == null ? new MemberInfo[0] : members);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: vsahostobject.cs プロジェクト: SSCLI/sscli_20021101
        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);
        }
コード例 #5
0
ファイル: vsahostobject.cs プロジェクト: ArildF/masters
 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);
 }