Esempio n. 1
0
        /// <summary>
        /// Reports coverage for the specified monitor.
        /// </summary>
        private void ReportActivityCoverageOfMonitor(Monitor monitor)
        {
            var monitorName = monitor.GetType().FullName;

            if (this.CoverageInfo.IsMachineDeclared(monitorName))
            {
                return;
            }

            // Fetch states.
            var states = monitor.GetAllStates();

            foreach (var state in states)
            {
                this.CoverageInfo.DeclareMachineState(monitorName, state);
            }

            // Fetch registered events.
            var pairs = monitor.GetAllStateEventPairs();

            foreach (var tup in pairs)
            {
                this.CoverageInfo.DeclareStateEvent(monitorName, tup.Item1, tup.Item2);
            }
        }
Esempio n. 2
0
        /// <inheritdoc/>
        internal override void NotifyRaisedEvent(Monitor monitor, Event e)
        {
            string monitorState = monitor.CurrentStateName;

            this.LogWriter.LogMonitorRaiseEvent(monitor.GetType().FullName, monitorState, e);
        }
Esempio n. 3
0
 /// <inheritdoc/>
 internal override void NotifyInvokedAction(Monitor monitor, MethodInfo action, string stateName, Event receivedEvent)
 {
     this.LogWriter.LogMonitorExecuteAction(monitor.GetType().FullName, stateName, action.Name);
 }
Esempio n. 4
0
 /// <inheritdoc/>
 internal override void NotifyExitedState(Monitor monitor)
 {
     this.LogWriter.LogMonitorStateTransition(monitor.GetType().FullName,
                                              monitor.CurrentStateName, false, monitor.GetHotState());
 }
Esempio n. 5
0
        /// <inheritdoc/>
        internal override void NotifyEnteredState(Monitor monitor)
        {
            string monitorState = monitor.CurrentStateName;

            this.LogWriter.LogMonitorStateTransition(monitor.GetType().FullName, monitorState, true, monitor.GetHotState());
        }