Exemplo n.º 1
0
        public void Setup()
        {
            AutofacConfig.RegisterTypes();
            var stratisEndPoint = new StratisEndPointAdhocService();
            var rsaEngine       = new EncryptDecrypt();

            _moocMicroCredentialProvider = new MoocMicroCredentialProvider(stratisEndPoint, rsaEngine);
            _employeeOperations          = new EmployeeOperations(stratisEndPoint, rsaEngine, _moocMicroCredentialProvider);
            _employerOperations          = new EmployerOperations(stratisEndPoint, rsaEngine, _moocMicroCredentialProvider);
        }
Exemplo n.º 2
0
        public CandidateController(UnitOfWork unitOfWork)
        {
            _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        employeeProvider = new EmployeeOperations(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.EmployeeOperations         = employeeProvider;
            moocMicroCredentialProvider.RepositoryEndPointService = _repositoryEndPointService;
            employeeProvider.RepositoryEndPointService            = _repositoryEndPointService;
            employeeProvider.StratisApiFullfilRequestComponent    = stratisApiRequests;
        }
Exemplo n.º 3
0
 public MoocMicroCredentialProvider(StratisEndPointAdhocService stratisEndPointService, EncryptDecrypt rsa316Engine)
 {
     Rsa316Engine           = rsa316Engine;
     StratisEndPointService = stratisEndPointService;
 }
Exemplo n.º 4
0
 public AccreditationBodyOperations(StratisEndPointAdhocService stratisEndPointService, EncryptDecrypt rsa316Engine)
 {
     Rsa316Engine            = rsa316Engine;
     _stratisEndPointService = stratisEndPointService;
 }
Exemplo n.º 5
0
 public EmployeeOperations(StratisEndPointAdhocService stratisEndPointService, EncryptDecrypt rsa316Engine, MoocMicroCredentialProvider moocProvider)
 {
     Rsa316Engine            = rsa316Engine;
     _stratisEndPointService = stratisEndPointService;
     MoocProvider            = moocProvider;
 }