public override Object HandleValue(PipelineContext ctx, String key, Object value)
        {
            ExistState ret = ExistState.NotExist;
            String     k   = keySource.GetKey(ctx, value);

            if (Debug)
            {
                ctx.DebugLog.Log("CheckExistAction: key={0}, source={1}", k == null ? "NULL" : k, this.keySource.Input);
            }
            if (k != null)
            {
                DateTime?dt = dateSource == null ? null : dateSource.GetKeyDate(ctx, value);
                if (Debug)
                {
                    ctx.DebugLog.Log("-- dt={0}, source={1}", dt == null ? "NULL" : dt.ToString(), this.dateSource);
                }
                ret = endPoint.Exists(ctx, k, dt);
                if (Debug)
                {
                    ctx.DebugLog.Log("-- ret={0}", ret);
                }
            }
            return(ret);
        }
Esempio n. 2
0
        public override Object HandleValue(PipelineContext ctx, String key, Object value)
        {
            value = ConvertAndCallScript(ctx, key, value);
            if ((ctx.ActionFlags & _ActionFlags.Skip) != 0)
            {
                goto EXIT_RTN;
            }

            if (cond == null || (cond.NeedRecord ? cond.HasCondition((JObject)endPoint.GetField(null)) : cond.HasCondition(value.ToJToken())))
            {
                ctx.Skipped++;
                ctx.ClearAllAndSetFlags(_ActionFlags.SkipRest, genericSkipUntil ? Name : skipUntil);
                if (keySource != null)
                {
                    String k = keySource.GetKey(ctx, value);
                    if (k != null)
                    {
                        endPoint.Delete(ctx, k);
                    }
                }
            }
EXIT_RTN:
            return(value);
        }