// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNetCore.SignalR;
namespace Microsoft.AspNetCore.Builder
{
///
/// Extension methods for .
///
public static class SignalRAppBuilderExtensions
{
///
/// Adds SignalR to the request execution pipeline.
///
/// The .
/// A callback to configure hub routes.
/// The same instance of the for chaining.
public static IApplicationBuilder UseSignalR(this IApplicationBuilder app, Action configure)
{
app.UseConnections(routes =>
{
configure(new HubRouteBuilder(routes));
});
return app;
}
}
}