You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
680 B
21 lines
680 B
using Microsoft.AspNetCore.Mvc.Infrastructure;
|
|
using Microsoft.Extensions.Primitives;
|
|
using System.Threading;
|
|
|
|
namespace WinFormNet5
|
|
{
|
|
public class MyActionDescriptorChangeProvider : IActionDescriptorChangeProvider
|
|
{
|
|
public static MyActionDescriptorChangeProvider Instance { get; } = new MyActionDescriptorChangeProvider();
|
|
|
|
public CancellationTokenSource TokenSource { get; private set; }
|
|
|
|
public bool HasChanged { get; set; }
|
|
|
|
public IChangeToken GetChangeToken()
|
|
{
|
|
TokenSource = new CancellationTokenSource();
|
|
return new CancellationChangeToken(TokenSource.Token);
|
|
}
|
|
}
|
|
} |