Exemplo n.º 1
0
        protected virtual void DoPositioned(ISvc svc, RawText line)
        {
            foreach (ISlnHandler h in SlnHandlers)
            {
                if (!h.Condition(line))
                {
                    continue;
                }

                if (TrackedPosition(h, svc, line) &&
                    (h.CoHandlers == null || !_coh.Contains(h.Id)))
                {
                    return;
                }
            }

            svc.Track(line);
        }
Exemplo n.º 2
0
        private bool TrackedPosition(ISlnHandler h, ISvc svc, RawText line)
        {
            bool isAct = h.IsActivated(svc);

            TransactTracking <ISection, IList <ISection> > tt = null;

            if (h.LineControl == LineAct.Process)
            {
                tt = svc.TransactTrack(line, isAct ? h : null);
            }

            if (!isAct)
            {
                return(false);
            }

            bool res = h.Positioned(svc, line);

            tt?.Action(res ? TransactAction.Commit : TransactAction.Rollback);

            return(res);
        }
Exemplo n.º 3
0
 public Section(object h, RawText raw, long line = -1)
 {
     Handler = h;
     Raw     = raw;
     Line    = line;
 }