search set line position of selected file

This commit is contained in:
Matt Parker
2025-09-25 01:01:45 +10:00
parent f8cd8d18d5
commit a5e6ece9f3
10 changed files with 49 additions and 16 deletions

View File

@@ -31,6 +31,7 @@ public static class AsyncEventExtensions
{
public static void InvokeParallelFireAndForget(this MulticastDelegate @event) => FireAndForget(() => @event.InvokeParallelAsync());
public static void InvokeParallelFireAndForget<T>(this MulticastDelegate @event, T arg) => FireAndForget(() => @event.InvokeParallelAsync(arg));
public static void InvokeParallelFireAndForget<T, U>(this MulticastDelegate @event, T arg, U arg2) => FireAndForget(() => @event.InvokeParallelAsync(arg, arg2));
private static async void FireAndForget(Func<Task> action)
{
@@ -53,6 +54,10 @@ public static class AsyncEventExtensions
{
return InvokeDelegatesAsync(@event.GetInvocationList(), del => ((Func<T, Task>)del)(arg));
}
public static Task InvokeParallelAsync<T, U>(this MulticastDelegate @event, T arg, U arg2)
{
return InvokeDelegatesAsync(@event.GetInvocationList(), del => ((Func<T, U, Task>)del)(arg, arg2));
}
private static async Task InvokeDelegatesAsync(IEnumerable<Delegate> invocationList, Func<Delegate, Task> delegateExecutorDelegate)
{