private void MarkVector(MotionVector motionVector)
        {
            // If there was not confused vector from this point we don't start another
            if (_rooms[motionVector.End.Uid].LastVectorEnter?.EqualsWithStartTime(motionVector) ?? false)
            {
                return;
            }

            _logger.Info(motionVector.ToString());

            _rooms[motionVector.Start.Uid].MarkLeave(motionVector);
            _rooms[motionVector.End.Uid].MarkEnter(motionVector);
        }
Esempio n. 2
0
        private async Task MarkVector(MotionVector motionVector)
        {
            // If there was not confused vector from this point we don't start another
            if (_rooms[motionVector.End.Uid].LastVectorEnter?.EqualsWithStartTime(motionVector) ?? false)
            {
                return;
            }

            Logger.LogInformation(motionVector.ToString());

            await _rooms[motionVector.Start.Uid].MarkLeave(motionVector).ConfigureAwait(false);

            _rooms[motionVector.End.Uid].MarkEnter(motionVector);
        }
        /// <summary>
        /// Marks enter to target room and leave from source room
        /// </summary>
        /// <param name="motionVector"></param>
        /// <returns></returns>
        private async Task MarkVector(MotionVector motionVector)
        {
            var targetRoom = _roomService.GetTargetRoom(motionVector);
            var sourceRoom = _roomService.GetSourceRoom(motionVector);

            // If there was no confused vector from this point we don't start another
            //if (targetRoom.HasSameLastTimeVector(motionVector)) return;

            Logger.LogInformation(motionVector.ToString());

            await sourceRoom.MarkLeave(motionVector);

            targetRoom.MarkEnter(motionVector);
        }