Exemplo n.º 1
0
        /// <summary>
        /// Specifies dynamic behavior for get operation for global variable in namespace
        /// </summary>
        public override bool TryGetMember(
            GetMemberBinder binder,
            out Object result
            )
        {
            switch (binder.Name)
            {
            case ClassID:
                result = Classes;
                return(true);

            case ConstID:
                result = Consts;
                return(true);
            }

            result = new NamespaceScope(Context, GetFullName(binder.Name));

            return(true);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Specifies dynamic behavior for get operation for global variable in namespace
        /// </summary>
        public override bool TryGetMember(
            GetMemberBinder binder,
            out Object result
        )
        {
            switch (binder.Name)
            {
                case ClassID:
                    result = Classes;
                    return true;

                case ConstID:
                    result = Consts;
                    return true;
            }

            result = new NamespaceScope(Context, GetFullName(binder.Name));

            return true;
        }