コード例 #1
0
        /// Prepare to run
        protected object ProcessPrepare(IFileSystemInfo from, IFileSystemInfo to, PrepareFunc func)
        {
            Context.CheckAbort();
            string pref = Context.TransformStr(Name, Transform);
            Vars   sv   = new Vars();

            sv[""] = sv["from"] = from;
            if (to != null)
            {
                sv["to"] = to;
            }

            return(Context.ExecuteWithVars(delegate()
            {
                object ret = func();
                return ret;
            }, sv, pref));
        }
コード例 #2
0
        /// Prepare to run
        protected object ProcessPrepare(IFileSystemInfo from, IFileSystemInfo to, PrepareFunc func)
        {
            Context.CheckAbort();
            string pref = Context.TransformStr(Name, Transform);
            Vars sv = new Vars();
            sv[""] = sv["from"] = from;
            if (to != null)
                sv["to"] = to;

            return Context.ExecuteWithVars(delegate()
                {
                    object ret = func();
                    return ret;
                },sv,pref);
        }