/// <summary> /// Метод создает и добавляет компонент сущности /// </summary> /// <typeparam name="TComponent">тип компонента, который необходимо создать</typeparam> /// <returns></returns> public EntityBuilder <T> AddComponent <TComponent>() where TComponent : ICompanent, new () { var type = typeof(TComponent); ICompanent component = Activator.CreateInstance <TComponent>(); _entity.Companents.Add(component); return(this); }
public void SetupComponent(ICompanent companent) { _companent = companent; }