Example #1
0
 public TransferController(ITransferService transferService,ICommonService commonService,IUserAccountService userAccountService, ICommodityService commodityService)
 {
     _transferService = transferService;
     _commonService = commonService;
     _userAccountService = userAccountService;
     _commodityService = commodityService;
 }
Example #2
0
 public SwapController(ITransferService transferService,ICommonService commonService,IUserAccountService userAccountService,
                           ICommodityService commodityService,ILog log)
 {
     _transferService = transferService;
     _commonService = commonService;
     _userAccountService = userAccountService;
     _commodityService = commodityService;
     _log = log;
 }
 public TransferController()
 {
     var dbfactory = new DatabaseFactory();
      _TransferService = new TransferService(new TransferRepository(dbfactory), new UnitOfWork(dbfactory));
      _TransferDetailService = new TransferDetailService(new TransferDetailRepository(dbfactory), new UnitOfWork(dbfactory));
      _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
      _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
      _StoreService = new StoreService(new InvStoreRepository(dbfactory), new UnitOfWork(dbfactory));
      _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
Example #4
0
 public TransferController(ITransferService transferService)
 {
     _transferService = transferService;
 }
 public TransferController(ITransferService service)
 {
     _service = service;
 }
 public HomeController(ITransferService transferService, ILogger <HomeController> logger)
 {
     _transferService = transferService;
     _logger          = logger;
 }
Example #7
0
 public TransferController(ILogger <TransferController> logger, ITransferService service)
 {
     _logger  = logger;
     _service = service;
 }
Example #8
0
 public TransferController(ILogger <TransferController> logger, ITransferService transferService)
 {
     _transferService = transferService;
     _logger          = logger;
 }
Example #9
0
 public TransferToInternalDetectedHandler(ITransferService transfersService, ILogFactory logFactory)
 {
     _transfersService = transfersService;
     _log = logFactory.CreateLog(this);
 }
Example #10
0
 public HomeController(ILogger <HomeController> logger, ITransferService transferService)
 {
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _transferService = transferService ?? throw new ArgumentNullException(nameof(transferService));
 }
Example #11
0
        public void UploadBackupFiles(ITransferService transferService)
        {
            LogService.LogEvent("Reading Backup Files");
            LogService.LogEvent();

            StreamReader         backupFiles = null;
            ICollection <String> backupPaths = null;

            if (!String.IsNullOrEmpty(_backupPath))
            {
                if (File.Exists(_path + "\\DirectBackupPaths.config"))
                {
                    backupFiles = new StreamReader(_path + "\\DirectBackupPaths.config", Encoding.UTF8);
                }
                else
                {
                    LogService.LogEvent("Missing DirectBackupPaths.config File - Skipping Direct Backup Files Upload");
                    return;
                }
            }
            else
            {
                LogService.LogEvent("No Backup Path Folder Specified - Skipping Direct Backup Files Upload");
                return;
            }

            try
            {
                string line;
                backupPaths = new Collection <String>();

                while ((line = backupFiles.ReadLine()) != null)
                {
                    backupPaths.Add(line);
                }

                backupPaths.Add(_backupPath + "\\*");
            }
            catch (Exception ex)
            {
                LogService.LogEvent("Error: UploadService.UploadBackupFiles (Read Paths) - " + ex.Message);
            }
            finally
            {
                backupFiles.Close();
            }

            try
            {
                if (backupPaths.Any())
                {
                    foreach (var backupPath in backupPaths)
                    {
                        int    index1      = backupPath.LastIndexOf('\\');
                        string filePattern = backupPath.Substring(index1 + 1);
                        string folderPath  = backupPath.Substring(0, index1);

                        IEnumerable <String> filePaths = Directory.EnumerateFiles(folderPath, filePattern, SearchOption.AllDirectories);

                        if (filePaths.Any())
                        {
                            foreach (var filePath in filePaths)
                            {
                                string fileName = Path.GetFileName(filePath);
                                LogService.LogEvent("Uploading Backup Files To FTP Server: " + fileName);

                                if (transferService.UploadFileAsync(filePath).Result)
                                {
                                    Thread.Sleep(1000);
                                    if (_deleteFiles)
                                    {
                                        File.Delete(filePath);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LogService.LogEvent("Error: UploadService.UploadBackupFiles (Upload Files) - " + ex.Message);
            }

            LogService.LogEvent("Finished Backup Files Transfer");
        }
 public TransferController(ITransferService transferSvc)
 {
     this.transferSvc = transferSvc;
 }
Example #13
0
 public CurrenciesController(ITransferService transferService, IValidateUserFilter validateUserFilter)
 {
     this.transferService    = transferService;
     this.validateUserFilter = validateUserFilter;
 }
Example #14
0
 public HomeController(ITransferService transferServiceProxy)
 {
     this._transferServiceProxy = transferServiceProxy;
 }
Example #15
0
 public TransferService(ITransferService transferService, IEventBus bus)
 {
     this.transferService = transferService;
     this.bus             = bus;
 }
Example #16
0
 public HomeController(ILogger <HomeController> logger, ITransferService transferService)
 {
     _logger          = logger;
     _transferService = transferService;
 }
 public TransferController(ITransferService transferService, IMapper mapper)
 {
     _transferService = transferService;
     _mapper          = mapper;
 }
 public AccountsController(IMapper mapper, IAccountsService accountsService,
                           IUsersService usersService, ICloudinaryService cloudinaryService, ITransferService transferService)
 {
     this.mapper            = mapper;
     this.accountsService   = accountsService;
     this.usersService      = usersService;
     this.cloudinaryService = cloudinaryService;
     this.transferService   = transferService;
 }
 public FileTransferManager(ILocalAssetManager localAssetManager, IStorageService storageService, ITransferService transferService)
 {
     _localAssetManager = localAssetManager;
     _transferService = transferService;
     _storageService = storageService.Local;
 }
Example #20
0
 public TransferController(IValidationService validationService, ITransferService transferService, ILogger <TransferController> logger)
 {
     _validationService = validationService;
     _transferService   = transferService;
     _logger            = logger;
 }