Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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;
        }