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); }
public static ComponentInfo GetInfo <T>(this T component) where T : Component => ComponentInfo.For <T>();