private IMenuBarItem createAddExistingChild <T>(TContainer container) where T : class, IEntity { var typeName = _objectTypeResolver.TypeFor <T>(); return(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddExisting(typeName)) .WithIcon(ApplicationIcons.LoadIconFor(typeName)) .WithCommandFor <AddExistingCommandFor <IContainer, T>, IContainer>(container)); }
protected IMenuBarItem CreateAddExistingItemFor(TParent parent) { return(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddExisting(ObjectTypeName)) .WithIcon(ApplicationIcons.LoadIconFor(typeof(TObjectBase).Name)) .WithCommandFor <AddExistingCommandFor <TParent, TObjectBase>, TParent>(parent)); }