/// 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)); }
/// 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); }