public static IConnectionBuilder UseHttpServer <TContext>(this IConnectionBuilder builder, IList <IConnectionAdapter> adapters, ServiceContext serviceContext, IHttpApplication <TContext> application, HttpProtocols protocols)
        {
            var middleware = new HttpConnectionMiddleware <TContext>(adapters, serviceContext, application, protocols);

            return(builder.Use(next =>
            {
                return middleware.OnConnectionAsync;
            }));
        }
Exemple #2
0
        public static IConnectionBuilder UseHttpServer <TContext>(this IConnectionBuilder builder, ServiceContext serviceContext, IHttpApplication <TContext> application, HttpProtocols protocols) where TContext : notnull
        {
            var middleware = new HttpConnectionMiddleware <TContext>(serviceContext, application, protocols);

            return(builder.Use(next =>
            {
                return middleware.OnConnectionAsync;
            }));
        }