mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-02 12:07:44 +08:00
efc0093dfd
* Remove 'Console.WriteLine' calls * Remove if block
30 lines
575 B
C#
30 lines
575 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AntDesign
|
|
{
|
|
|
|
public class MessageResult
|
|
{
|
|
public MessageResult(Task task)
|
|
{
|
|
Task = task;
|
|
}
|
|
|
|
public Task Task { get; private set; }
|
|
|
|
public MessageResult Then(Action action)
|
|
{
|
|
var t = Task.ContinueWith((result) =>
|
|
{
|
|
action?.Invoke();
|
|
}, TaskScheduler.Current);
|
|
return new MessageResult(t);
|
|
}
|
|
|
|
}
|
|
}
|