﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Builder;

namespace Air.Client.AspNetCore
{
    public static class ApplicationBuilderExtensions
    {
        public static void UseAir(this IApplicationBuilder app, string logId)
        {
            app.UseMiddleware<AirMiddleware>(logId);


            MessageSink.Default = (MessageSink)app.ApplicationServices.GetService(typeof(MessageSink));

        }
    }
}
