mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
042694b96f
* feat: add component message * fix: then interface and demo bugs Co-authored-by: James Yeung <shunjiey@hotmail.com>
31 lines
626 B
C#
31 lines
626 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AntBlazor
|
|
{
|
|
|
|
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) =>
|
|
{
|
|
Console.WriteLine("ContinueWith");
|
|
action?.Invoke();
|
|
}, TaskScheduler.Current);
|
|
return new MessageResult(t);
|
|
}
|
|
|
|
}
|
|
}
|