Microsoft.AspNetCore.SignalR.Hubs.HubPipelineModule.BuildReconnect C# (CSharp) Méthode

BuildReconnect() public méthode

Wraps a function that is called when a client reconnects to the HubDispatcher for each IHub the client connects to. By default, this results in the IHub's OnReconnected method being invoked.
public BuildReconnect ( Task>.Func reconnect ) : Task>.Func
reconnect Task>.Func A function to be called when a client reconnects to a hub.
Résultat Task>.Func
        public virtual Func<IHub, Task> BuildReconnect(Func<IHub, Task> reconnect)
        {
            return (hub) =>
            {
                if (OnBeforeReconnect(hub))
                {
                    return reconnect(hub).OrEmpty().Then(h => OnAfterReconnect(h), hub);
                }
                return TaskAsyncHelper.Empty;
            };
        }