EventLoopExtensions
A set of useful extensions for the event loop.
using System;
namespace AngleSharp.Extensions
{
internal static class EventLoopExtensions
{
public static void Enqueue(this IEventLoop loop, Action action, TaskPriority priority = TaskPriority.Normal)
{
if (loop != null)
loop.Enqueue(delegate {
action();
}, priority);
else
action();
}
}
}