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); }
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); }
public Section(object h, RawText raw, long line = -1) { Handler = h; Raw = raw; Line = line; }