public EndorsementBodyController(UnitOfWork unitOfWork) { _roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(new ApplicationDbContext())); _unitOfWork = unitOfWork; _unitOfWork.UniSADbContext = new UniSA.DataAccess.UniSADbContext(); var moocMicroCredentialProvider = new MoocMicroCredentialProvider(new StratisEndPointAdhocService(), new EncryptDecrypt()); _repositoryEndPointService = new RepositoryEndPointServices(_unitOfWork, moocMicroCredentialProvider); _repositoryEndPointService = new RepositoryEndPointServices(_unitOfWork, moocMicroCredentialProvider); moocMicroCredentialProvider.RepositoryEndPointService = _repositoryEndPointService; }
public RecruitmentAgentController(UnitOfWork unitOfWork) { _roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(new ApplicationDbContext())); _unitOfWork = unitOfWork; _unitOfWork.UniSADbContext = new UniSA.DataAccess.UniSADbContext(); var moocMicroCredentialProvider = new MoocMicroCredentialProvider(new StratisEndPointAdhocService(), new EncryptDecrypt()); HttpClient client = new HttpClient(); client.BaseAddress = new Uri(ConfigurationManager.AppSettings["StratisBlockChainBaseUrl"]); moocMicroCredentialProvider.StratisApiFullfilRequestComponent = new UniSA.Services.StratisBlockChainServices.StratisApi.StratisApiFullfilRequestComponent(client); _repositoryEndPointService = new RepositoryEndPointServices(_unitOfWork, moocMicroCredentialProvider); }
public EmployerController(UnitOfWork unitOfWork, ApplicationUserManager userManager) { _roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(new ApplicationDbContext())); _unitOfWork = unitOfWork; _unitOfWork.UniSADbContext = new UniSA.DataAccess.UniSADbContext(); var stratisEndPoint = new StratisEndPointAdhocService(); var moocMicroCredentialProvider = new MoocMicroCredentialProvider(new StratisEndPointAdhocService(), new EncryptDecrypt()); var employerProvider = new EmployerOperations(stratisEndPoint, new EncryptDecrypt(), moocMicroCredentialProvider); HttpClient client = new HttpClient(); client.BaseAddress = new Uri(ConfigurationManager.AppSettings["StratisBlockChainBaseUrl"]); var stratisApiRequests = new UniSA.Services.StratisBlockChainServices.StratisApi.StratisApiFullfilRequestComponent(client);; moocMicroCredentialProvider.StratisApiFullfilRequestComponent = stratisApiRequests; _repositoryEndPointService = new RepositoryEndPointServices(_unitOfWork, moocMicroCredentialProvider); _repositoryEndPointService.EmployerOperations = employerProvider; moocMicroCredentialProvider.RepositoryEndPointService = _repositoryEndPointService; employerProvider.RepositoryEndPointService = _repositoryEndPointService; employerProvider.StratisApiFullfilRequestComponent = stratisApiRequests; _userManager = userManager; }