Ejemplo n.º 1
0
        public IEntity Complete(Type componentType, object parameters = null)
        {
            var component = ComponentInfo.For(componentType).Create(this, parameters);

            _components.AddFirst(component);

            // Explicitly do not descent the original components
            foreach (var other in _components)
            {
                ComponentInfo.For(other.GetType()).GetSupport(componentType)(other, component);
            }

            return(this);
        }
Ejemplo n.º 2
0
 public static ComponentInfo GetInfo <T>(this T component) where T : Component =>
 ComponentInfo.For <T>();