using Microsoft.Azure.Functions.Extensions.DependencyInjection;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Reflection;
using System.Text;
using TEAMModelOS.SDK.DI;

[assembly: FunctionsStartup(typeof(TEAMModelFunction.Startup))]
namespace TEAMModelFunction
{
    public class Startup : FunctionsStartup
    { 
        public override void Configure(IFunctionsHostBuilder builder)
        { 
            builder.Services.AddHttpClient();
            builder.Services.AddHttpClient<DingDing>();
            builder.Services.AddAzureServiceBus(Environment.GetEnvironmentVariable("Azure:ServiceBus:ConnectionString"));
            builder.Services.AddAzureStorage(Environment.GetEnvironmentVariable("Azure:Storage:ConnectionString"));
            builder.Services.AddAzureCosmos(Environment.GetEnvironmentVariable("Azure:Cosmos:ConnectionString"));
            builder.Services.AddAzureRedis(Environment.GetEnvironmentVariable("Azure:Redis:ConnectionString"));
        }
    }
}
