public override async Task CreateServerAsync(Func <GenericLoopbackServer, Uri, Task> funcAsync, int millisecondsTimeout = 60000, GenericLoopbackOptions options = null) { using GenericLoopbackServer server = CreateServer(options); await funcAsync(server, server.Address).TimeoutAfter(millisecondsTimeout).ConfigureAwait(false); }
public override async Task CreateServerAsync(Func <GenericLoopbackServer, Uri, Task> funcAsync, int millisecondsTimeout = 60000, GenericLoopbackOptions options = null) { using GenericLoopbackServer server = CreateServer(options); await funcAsync(server, server.Address).WaitAsync(TimeSpan.FromMilliseconds(millisecondsTimeout)); }