using Unity;
using Gebhardt.StoreWare.Wcs.HostBooking.InterfaceWcsWms.MessageImplementation;
using Gebhardt.StoreWare.Wcs.HostBooking.InterfaceWcsWms.Interfaces;
using Gebhardt.StoreWare.WcsWms.InterfaceWcsWms.Interfaces;
using Gebhardt.StoreWare.WcsWms.InterfaceWcsWms.Models;
using Gebhardt.StoreWare.WcsWms.InterfaceWcsWms.Services;

namespace Gebhardt.StoreWare.Wcs.HostBooking.InterfaceWcsWms
{
	public static class MessageInitializer
	{
		public static void RegisterFromWmsServices(this IUnityContainer unityContainer)
		{
			unityContainer.RegisterType<IHostMessageFromWmsService, HostMessageFromWmsService>();
		}

		public static void RegisterFromWmsHandlers(this IUnityContainer unityContainer)
		{

			unityContainer.RegisterType<IHandleRecord<TransportOrder>, TransportOrderHandler>("TransportOrder");

			unityContainer.RegisterType<IHandleRecord<ShipmentTransportOrder>, ShipmentTransportOrderHandler>("ShipmentTransportOrder");

			unityContainer.RegisterType<IHandleRecord<AcknowledgeTransportCompleted>, AcknowledgeTransportCompletedHandler>("AcknowledgeTransportCompleted");

			unityContainer.RegisterType<IHandleRecord<DepartureNotification>, DepartureNotificationHandler>("DepartureNotification");

			//unityContainer.RegisterType<IHandleRecord<RequestEmptyHuReport>, RequestEmptyHuReportHandler>("RequestEmptyHuReport");

			unityContainer.RegisterType<IHandleRecord<HuChange>, HuChangeHandler>("HuChange");
		}
	}
}