submit Add and Edit Command
This commit is contained in:
23
Apollon.WPF/Commands/AsyncCommandBase.cs
Normal file
23
Apollon.WPF/Commands/AsyncCommandBase.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Apollon.WPF.Commands
|
||||
{
|
||||
public abstract class AsyncCommandBase : CommandBase
|
||||
{
|
||||
public override async void Execute(object parameter)
|
||||
{
|
||||
try
|
||||
{
|
||||
await ExecuteAsync(parameter);
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
}
|
||||
|
||||
public abstract Task ExecuteAsync(object parameter);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user