@@ -24,6 +24,17 @@ public MenuItemList(ActionCollection actionCollection, IEnumerable<MenuItem> ite
24
24
: base ( items ) =>
25
25
_actionCollection = actionCollection ;
26
26
27
+ /// <summary>
28
+ /// Adds a menu item with a dictionary which is merged to the AdditionalData bag
29
+ /// </summary>
30
+ /// <typeparam name="T"></typeparam>
31
+ /// <param name="hasSeparator"></param>
32
+ /// <param name="textService">The <see cref="ILocalizedTextService" /> used to localize the action name based on its alias</param>
33
+ /// <param name="opensDialog">Whether or not this action opens a dialog</param>
34
+ /// <param name="useLegacyIcon">Whether or not this action should use legacy icon prefixed with "icon-" or full icon name is specified.</param>
Has conversations. Original line has conversations.
35
+ public MenuItem ? Add < T > ( ILocalizedTextService textService , bool hasSeparator = false , bool opensDialog = false )
36
+ where T : IAction => Add < T > ( textService , hasSeparator , opensDialog , useLegacyIcon : true ) ;
37
+
27
38
/// <summary>
28
39
/// Adds a menu item with a dictionary which is merged to the AdditionalData bag
29
40
/// </summary>
@@ -35,7 +46,7 @@ public MenuItemList(ActionCollection actionCollection, IEnumerable<MenuItem> ite
35
46
public MenuItem ? Add < T > ( ILocalizedTextService textService , bool hasSeparator = false , bool opensDialog = false , bool useLegacyIcon = true )
36
47
where T : IAction
37
48
{
38
- var item = CreateMenuItem < T > ( textService , hasSeparator , opensDialog ) ;
49
+ MenuItem ? item = CreateMenuItem < T > ( textService , hasSeparator , opensDialog , useLegacyIcon ) ;
39
50
if ( item != null )
40
51
{
41
52
Add ( item ) ;