You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

49 lines
1.4 KiB

using Business.BusinessLogic.Auth;
using Business.BusinessLogic.TPApiServices.Factory;
using Business.BusinessLogic.TPApiServices.TPServices;
using Business.TokenManagement;
using Common.TPService;
using GMENepal.GMENepalAPIService;
using Repository.DAO.ThirdParty;
using System.Web.Http;
using Unity;
using Unity.WebApi;
namespace Business.DIConfig
{
public static class UnityConfig
{
public static void RegisterComponents()
{
var container = new UnityContainer();
// e.g. container.RegisterType<ITestService, TestService>();
//////
#region Config for business Layer
container.RegisterType<IAuthServices, AuthServices>();
container.RegisterType<ITokenManagementServices, TokenManagementServices>();
container.RegisterType<ITPApiServices, ThirdPartyServices>();
container.RegisterType<IApiFactoryServices, ApiFactoryServices>();
#endregion Config for business Layer
#region Config for Repo Layer
container.RegisterType<IThirdPartyRepo, ThirdPartyRepo>();
#endregion Config for Repo Layer
#region GMENEPAL
container.RegisterType<ITPApiServices, GMENepalAPI>();
#endregion GMENEPAL
////////
GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container);
}
}
}