Microsoft.JScript.Member.EvaluateAsWrappedNamespace C# (CSharp) Method

EvaluateAsWrappedNamespace() private method

private EvaluateAsWrappedNamespace ( bool giveErrorIfNameInUse ) : WrappedNamespace
giveErrorIfNameInUse bool
return WrappedNamespace
      internal override WrappedNamespace EvaluateAsWrappedNamespace(bool giveErrorIfNameInUse){
        WrappedNamespace root = this.rootObject.EvaluateAsWrappedNamespace(giveErrorIfNameInUse);
        String name = this.name;
        root.AddFieldOrUseExistingField(name, Namespace.GetNamespace(root.ToString()+"."+name, this.Engine), FieldAttributes.Literal);
        return new WrappedNamespace(root.ToString()+"."+name, this.Engine);
      }      
      

Usage Example

Example #1
0
        internal Package(string name, AST id, ASTList classList, Context context) : base(context)
        {
            this.name        = name;
            this.classList   = classList;
            this.scope       = (PackageScope)base.Globals.ScopeStack.Peek();
            this.scope.owner = this;
            base.Engine.AddPackage(this.scope);
            Lookup lookup = id as Lookup;

            if (lookup != null)
            {
                lookup.EvaluateAsWrappedNamespace(true);
            }
            else
            {
                Member member = id as Member;
                if (member != null)
                {
                    member.EvaluateAsWrappedNamespace(true);
                }
            }
        }
All Usage Examples Of Microsoft.JScript.Member::EvaluateAsWrappedNamespace