An offline code review came up with a critical piece of feedback:
The constructor for Task takes an Action<T>. The async delegate therefore generates an async void method, which has 2 implications:
If an unhandled exception is thrown from the async void method, it will crash the process (unlikely, since it's just calling Task.Delay(), but it's an ...
Not sure if it counts as an answer, but the most important missing part was the following ASP.NET Core attribute:
public class AmbientContextAttribute : Attribute, IAsyncActionFilter
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
using (new Op(context.HttpContext.Request....
I would personally prefer a simpler approach, using System.Reactive (Rx.NET):
public abstract class ViewModel : INotifyPropertyChanged
public ViewModel(int throttlingPeriod = 250)
public ViewModel(TimeSpan throttlingPeriod)
Subject = new Subject<string>();