Exemplo n.º 1
0
 public static IEntity Mutual(this IEntity before, IEntity inner, IReverseFunction reverseFunction)
 {
     if (inner is EntityGroup g)
     {
         return(Mutual(before, g.Entities, reverseFunction));
     }
     else
     {
         return(Mutual(before, new IEntity[] { inner, }, reverseFunction));
     }
 }
Exemplo n.º 2
0
        public static IEntity Mutual(this IEntity before, IEnumerable <IEntity> inner, IReverseFunction reverseFunction)
        {
            var g = before as EntityGroup ?? new EntityGroup();
            var e = new MutualEntity
            {
                ReverseFunction = reverseFunction,
            };

            foreach (var ee in inner)
            {
                e.Timeline.Entities.Add(ee);
            }
            g.Entities.Add(e);
            return(g);
        }
Exemplo n.º 3
0
 public static IEntity Mutual(this IEntity before, Func <IEntity, IEntity> inner, IReverseFunction reverseFunction)
 => Mutual(before, inner(new EntityBuilder()), reverseFunction);