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.
 
 

33 lines
1.0 KiB

using Common.TPService;
using Common.Utility;
using GMENepal.GMENepalAPIService;
using log4net;
using TPService.GCC.Services;
using Unity;
namespace Business.BusinessLogic.TPApiServices.Factory
{
public class ApiFactoryServices : IApiFactoryServices
{
private readonly ILog log = LogManager.GetLogger(typeof(ApiFactoryServices));
private readonly UnityContainer _container = new UnityContainer();
private ITPApiServices apiFactory;
public ITPApiServices GetServices(string providerNo)
{
if (providerNo == GetStatic.ReadWebConfig("gmenepal", ""))
{
log.Debug("Choose Provider as GMENepalAPI");
apiFactory = _container.Resolve<GMENepalAPI>();
}
else if (providerNo == GetStatic.ReadWebConfig("gccremit", ""))
{
log.Debug("Choose Provider as GCC ");
apiFactory = _container.Resolve<GCCAPI>();
}
return apiFactory;
}
}
}