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.
75 lines
2.1 KiB
75 lines
2.1 KiB
using BankOfCeylon.BankOfCeylonAPIService;
|
|
using BracBank.BracBankApiService;
|
|
using Business.BusinessLogic.Auth;
|
|
using Business.BusinessLogic.TPApiServices.Factory;
|
|
using Business.BusinessLogic.TPApiServices.TPServices;
|
|
using Business.TokenManagement;
|
|
using Common.TPService;
|
|
using Donga.DongaAPIService;
|
|
using GMENepal.GMENepalAPIService;
|
|
using Repository.DAO.ThirdParty;
|
|
using System.Web.Http;
|
|
using Transfast.ApiServices;
|
|
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 IDongaAPI
|
|
|
|
container.RegisterType<ITPApiServices, DongApiV2>();
|
|
|
|
#endregion IDongaAPI
|
|
|
|
#region TRANSFAST
|
|
|
|
container.RegisterType<ITPApiServices, TFAPI>();
|
|
|
|
#endregion TRANSFAST
|
|
|
|
#region GMENEPAL
|
|
|
|
container.RegisterType<ITPApiServices, GMENepalAPI>();
|
|
|
|
#endregion GMENEPAL
|
|
|
|
#region Bank Of Ceylon
|
|
|
|
container.RegisterType<ITPApiServices, BankOfCeylonAPI>();
|
|
|
|
#endregion Bank Of Ceylon
|
|
|
|
#region BRAC
|
|
|
|
container.RegisterType<ITPApiServices, BracBankAPI>();
|
|
|
|
#endregion BRAC
|
|
////////
|
|
GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container);
|
|
}
|
|
}
|
|
}
|