@@ -12,25 +12,25 @@ namespace BB84.Notifications;
12
12
/// </remarks>
13
13
/// <param name="execute">The action to execute.</param>
14
14
/// <param name="canExecute">The condition to execute.</param>
15
- public sealed class RelayCommand ( Action < object ? > execute , Predicate < object ? > ? canExecute ) : IRelayCommand
15
+ public sealed class RelayCommand ( Action execute , Func < bool > ? canExecute ) : IRelayCommand
16
16
{
17
17
/// <summary>
18
18
/// Initializes a new instance of the <see cref="RelayCommand"/> class that can always execute.
19
19
/// </summary>
20
20
/// <param name="execute">The action to execute.</param>
21
- public RelayCommand ( Action < object ? > execute ) : this ( execute , null )
21
+ public RelayCommand ( Action execute ) : this ( execute , null )
22
22
{ }
23
23
24
24
/// <inheritdoc/>
25
25
public event EventHandler ? CanExecuteChanged ;
26
26
27
27
/// <inheritdoc/>
28
28
public bool CanExecute ( object ? parameter )
29
- => canExecute is null || canExecute . Invoke ( parameter ) ;
29
+ => canExecute is null || canExecute . Invoke ( ) ;
30
30
31
31
/// <inheritdoc/>
32
32
public void Execute ( object ? parameter )
33
- => execute . Invoke ( parameter ) ;
33
+ => execute . Invoke ( ) ;
34
34
35
35
/// <inheritdoc/>
36
36
public void NotifyCanExecuteChanged ( )
@@ -48,7 +48,7 @@ public void NotifyCanExecuteChanged()
48
48
/// <typeparam name="T">The type to wor with</typeparam>
49
49
/// <param name="execute">The action to execute.</param>
50
50
/// <param name="canExecute">The condition to execute.</param>
51
- public sealed class RelayCommand < T > ( Action < T > execute , Predicate < T > ? canExecute ) : IRelayCommand < T >
51
+ public sealed class RelayCommand < T > ( Action < T > execute , Func < T , bool > ? canExecute ) : IRelayCommand < T >
52
52
{
53
53
/// <summary>
54
54
/// Initializes a new instance of <see cref="RelayCommand{T}"/> class that can always execute.
0 commit comments