Merge remote-tracking branch 'origin/netcore/dev' into netcore/netcore
Signed-off-by: Bjarke Berg <mail@bergmania.dk> # Conflicts: # build/build-bootstrap.ps1 # src/Umbraco.Infrastructure/Compose/NotificationsComponent.cs # src/Umbraco.Infrastructure/Compose/PublicAccessComponent.cs # src/Umbraco.Infrastructure/Search/ExamineComponent.cs # src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs # src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs # src/Umbraco.Web/Compose/BackOfficeUserAuditEventsComponent.cs # src/Umbraco.Web/Logging/WebProfilerComponent.cs
This commit is contained in:
32
src/Umbraco.Infrastructure/Scheduling/SimpleTask.cs
Normal file
32
src/Umbraco.Infrastructure/Scheduling/SimpleTask.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Umbraco.Web.Scheduling
|
||||
{
|
||||
/// <summary>
|
||||
/// A simple task that executes a delegate synchronously
|
||||
/// </summary>
|
||||
internal class SimpleTask : IBackgroundTask
|
||||
{
|
||||
private readonly Action _action;
|
||||
|
||||
public SimpleTask(Action action)
|
||||
{
|
||||
_action = action;
|
||||
}
|
||||
|
||||
public bool IsAsync => false;
|
||||
|
||||
public void Run() => _action();
|
||||
|
||||
public Task RunAsync(CancellationToken token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user