private IMenuBarItem createAddExistingFromTemplateItemFor <T>(TContainer parent) where T : class { var typeName = _objectTypeResolver.TypeFor <T>(); return(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddExistingFromTemplate(typeName)) .WithIcon(ApplicationIcons.LoadTemplateIconFor(typeName)) .WithCommandFor <AddExistingFromTemplateCommandFor <IContainer, T>, IContainer>(parent)); }
protected IMenuBarItem CreateAddExistingFromTemplateItemFor(TParent parent) { return(CreateMenuButton.WithCaption(AppConstants.MenuNames.AddExistingFromTemplate(ObjectTypeName)) .WithIcon(ApplicationIcons.LoadTemplateIconFor(typeof(TObjectBase).Name)) .WithCommandFor <AddExistingFromTemplateCommandFor <TParent, TObjectBase>, TParent>(parent)); }