public SubscriptionToken ProcessEntity(IReactToEntitySystem system, IEntity entity)
        {
            var hasEntityPredicate = system.TargetGroup.TargettedEntities != null;
            var subscription       = system.ReactToEntity(entity)
                                     .Subscribe(x =>
            {
                if (hasEntityPredicate)
                {
                    if (system.TargetGroup.TargettedEntities(x))
                    {
                        system.Execute(x);
                    }
                    return;
                }

                system.Execute(x);
            });

            return(new SubscriptionToken(entity, subscription));
        }
        public SubscriptionToken ProcessEntity(IReactToEntitySystem system, IEntity entity)
        {
            var hasEntityPredicate = system.TargetGroup is IHasPredicate;
            var subscription       = system.ReactToEntity(entity)
                                     .Subscribe(x =>
            {
                if (hasEntityPredicate)
                {
                    var groupPredicate = system.TargetGroup as IHasPredicate;
                    if (groupPredicate.CanProcessEntity(x))
                    {
                        system.Execute(x);
                    }
                    return;
                }

                system.Execute(x);
            });

            return(new SubscriptionToken(entity, subscription));
        }