////TODO: Remove this after implementing full factory
        private static Filter <IUserChangedEvent> GetParentFilter(this EventPublisher <IUserChangedEvent> publisher,
                                                                  GestureBase gesture)
        {
            foreach (Filter <IUserChangedEvent> parentFilter in publisher._pipelines)
            {
                if (parentFilter.ContainsPipe(gesture))
                {
                    return(parentFilter);
                }
            }

            return(null);
        }
        ////TODO: Remove this after implementing full factory
        public static void RemoveGesture(this User user, GestureBase gesture)
        {
            if (gesture == null)
            {
                throw new ArgumentNullException("gesture");
            }

            var filter = user.GetParentFilter(gesture);

            user.DetachPipeline(filter);
            ////TODO: Destroy all pipes
            gesture = null;
        }
        ////TODO: Remove this after implementing full factory
        private static bool ContainsPipe(this Filter <IUserChangedEvent> publisher, GestureBase gesture)
        {
            if (publisher._pipelines.Contains(gesture))
            {
                return(true);
            }
            else
            {
                foreach (Filter <IUserChangedEvent> pub in publisher._pipelines)
                {
                    return(pub.ContainsPipe(gesture));
                }
            }

            return(false);
        }