Ejemplo n.º 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);
        }