using Valg.EVA.Skanning.ContainerExtensions;
using Unity;
using Valg.EVA.Skanning.BackgroundServices.CheckTransferStatus;
using Valg.EVA.Skanning.BackgroundServices.CleanupAbandonedTransfers;

namespace Valg.EVA.Skanning.BackgroundServices
{
    public class UnityInstaller : IUnityInstaller
    {
        public void Install(IUnityContainer unityContainer)
        {
            unityContainer.RegisterType<CheckTransferStatusService>();
            unityContainer.RegisterType<CleanupAbandonedTransfersService>();
            unityContainer.RegisterType<ITaskManagerInitializer, TaskManagerInitializer>(ContainerLifetimes.CreateContainerControlledLifetimeManager());
            unityContainer.RegisterType<ISendTimeoutFromServiceBindingUtility, SendTimeoutFromServiceBinding>(ContainerLifetimes.CreateContainerControlledLifetimeManager());
        }
    }
}
