Exemplo n.º 1
0
 public TrustManagementService(ApplicationDbContext context, IIpfsService ipfsService, ISmartContractService smartContractService, IStatisticService statisticService, IRateService rateService, ILogger <ITrustManagementService> logger)
 {
     this.context              = context;
     this.ipfsService          = ipfsService;
     this.smartContractService = smartContractService;
     this.statisticService     = statisticService;
     this.rateService          = rateService;
     this.logger = logger;
 }
Exemplo n.º 2
0
        public FileController(IConfiguration configuration)
        {
            _configuration = configuration;

            _ipfsService = new IpfsService(
                _configuration["IPFS:API:host"],
                int.Parse(_configuration["IPFS:API:port"]),
                _configuration["IPFS:API:protocol"]
                );

            //todo get secure info from Environment Variables
            _web3            = new Web3Geth(_configuration["Ethereum:RPCServer"] as string);
            _contractAddress = EV.ContractAddress;
            _walletAddress   = EV.WalletAddress;
            _gas             = long.Parse(_configuration["Ethereum:Gas"]);

            _ethereumFileService = new EthereumFileService(_web3, _contractAddress, _walletAddress, _gas);
            _ethereumUserService = new EthereumUserService(_web3, _contractAddress, _walletAddress, _gas);
        }
 public TradeServerService(ApplicationDbContext context, IStatisticService statisticService, IIpfsService ipfsService)
 {
     this.context          = context;
     this.statisticService = statisticService;
     this.ipfsService      = ipfsService;
 }
Exemplo n.º 4
0
 public TradesController(IIpfsService ipfsService, ITradesService tradesServer, UserManager <ApplicationUser> userManager)
     : base(userManager)
 {
     this.ipfsService  = ipfsService;
     this.tradesServer = tradesServer;
 }
 public IPFSController(IIpfsService ipfsService, IHttpContextAccessor _contextAccessor)
 {
     this.ipfsService      = ipfsService;
     this._contextAccessor = _contextAccessor;
 }
Exemplo n.º 6
0
 public UploadController(IIpfsService ipfsService, IHostingEnvironment hostingEnvironment)
 {
     _ipfsService        = ipfsService;
     _hostingEnvironment = hostingEnvironment;
 }