Пример #1
0
        ///////////////////////////////////////////////////////////////////////

        public override ReturnCode GetCurrentNamespace(
            ICallFrame frame,
            ref INamespace @namespace,
            ref Result error
            )
        {
            INamespace localNamespace = NamespaceOps.GetCurrent(
                base.Interpreter, frame);

            if (localNamespace != null)
            {
                IResolve resolve = localNamespace.Resolve;

                if (resolve != null)
                {
                    return(resolve.GetCurrentNamespace(
                               frame, ref @namespace, ref error));
                }
                else
                {
                    @namespace = localNamespace;
                    return(ReturnCode.Ok);
                }
            }

            error = "no current namespace for call frame";
            return(ReturnCode.Error);
        }
Пример #2
0
        ///////////////////////////////////////////////////////////////////////

        #region IResolve Members
        public override ReturnCode GetVariableFrame(
            ref ICallFrame frame,
            ref string varName,
            ref VariableFlags flags,
            ref Result error
            )
        {
            INamespace @namespace = NamespaceOps.GetCurrent(
                base.Interpreter, frame);

            if (@namespace != null)
            {
                IResolve resolve = @namespace.Resolve;

                if (resolve != null)
                {
                    return(resolve.GetVariableFrame(
                               ref frame, ref varName, ref flags, ref error));
                }
            }

            return(NamespaceOps.GetVariableFrame(
                       base.Interpreter, ref frame, ref varName, ref flags,
                       ref error));
        }