public void End() { if (logger.IsDebugEnabled) { logger.Debug(this + "End()"); } // check if end() was already called before by looking at endTime if (Interlocked.CompareExchange(ref endTime, beacon.CurrentTimestamp, -1L) != -1L) { return; } // leave all Root-Actions for sanity reasons while (!openRootActions.IsEmpty()) { IAction action = openRootActions.Get(); action.LeaveAction(); } endTime = beacon.CurrentTimestamp; // create end session data on beacon beacon.EndSession(this); // finish session on configuration and stop managing it beaconSender.FinishSession(this); }
// *** protected methods *** protected override IAction DoLeaveAction() { // leave all open Child-Actions while (!openChildActions.IsEmpty()) { IAction action = openChildActions.Get(); action.LeaveAction(); } return(base.DoLeaveAction()); }
public void End() { // check if end() was already called before by looking at endTime if (endTime != -1) { return; } // leave all Root-Actions for sanity reasons while (!openRootActions.IsEmpty()) { IAction action = openRootActions.Get(); action.LeaveAction(); } endTime = beacon.CurrentTimestamp; // create end session data on beacon beacon.EndSession(this); // finish session on configuration and stop managing it beaconSender.FinishSession(this); }