コード例 #1
0
 public CoreBankingService(
     OnePayContext context, IUserService userService
     , IAccountsService accountsService
     , IBusinessProductService businessProductService
     , IMessagingService messagingService
     , ITransactionService transactionService
     )
 {
     _context                = context;
     _userService            = userService;
     _accountsService        = accountsService;
     _businessProductService = businessProductService;
     _transactionService     = transactionService;
     _messagingService       = messagingService;
 }
コード例 #2
0
ファイル: OnePayTest.cs プロジェクト: nilanjansen/OnePayAPI
        public OnePayTest()
        {
            //Context preperation
            configuration = new ConfigurationBuilder()
                            .SetBasePath(Directory.GetCurrentDirectory())
                            .AddJsonFile("appSettings.json")
                            .Build();
            string connectionString = configuration.GetConnectionString("DefaultConnection");
            var    dbOptions        = new DbContextOptionsBuilder <OnePayContext>().UseSqlServer(connectionString).Options;

            onePayContext = new OnePayContext(dbOptions);

            //Initialize mapper
            var mappings = new MapperConfigurationExpression();

            mappings.AddProfile <AutoMapperProfile>();
            Mapper.Initialize(mappings);

            IUserService userService = new UserService(onePayContext);

            usersController = new UsersController(userService, Mapper.Instance);

            IAccountsService accountsService = new AccountsService(onePayContext);

            userAccountsController = new UserAccountsController(accountsService, userService, Mapper.Instance);

            IBusinessProductService businessProductService = new BusinessProductService(onePayContext);

            businessProductsController = new BusinessProductsController(businessProductService, userService, Mapper.Instance);

            ITransactionService transactionService = new TransactionService(onePayContext);

            onePayTransactionsController = new OnePayTransactionsController(transactionService, userService, Mapper.Instance);

            IOnePayService      onePayService      = new OnePayService(onePayContext, businessProductService, userService);
            IMessagingService   messagingService   = new MessagingService(onePayContext);
            ICoreBankingService coreBankingService = new CoreBankingService(onePayContext, userService, accountsService, businessProductService, messagingService, transactionService);

            onePayController = new OnePayController(transactionService, userService, onePayService, coreBankingService, Mapper.Instance);

            Startup.APIKEY = configuration["APIKEYs:TextLocal"];
            Startup.APIURL = configuration["APIURLs:TextLocalUrl"];
        }
コード例 #3
0
ファイル: OnePay.cs プロジェクト: nilanjansen/OnePayAPI
 public OnePay(OnePayContext context)
 {
     _context = context;
 }
コード例 #4
0
 public TransactionService(OnePayContext context)
 {
     _context = context;
 }
コード例 #5
0
ファイル: UserServices.cs プロジェクト: nilanjansen/OnePayAPI
 public UserService(OnePayContext context)
 {
     _context = context;
 }
コード例 #6
0
 public AccountsService(OnePayContext context)
 {
     _context = context;
 }
コード例 #7
0
 public OnePayService(OnePayContext context, IBusinessProductService businessProductService, IUserService userService)
 {
     _context = context;
     _businessProductService = businessProductService;
     _userService            = userService;
 }
コード例 #8
0
 public BusinessProductService(OnePayContext context)
 {
     _context = context;
 }
コード例 #9
0
 public MessagingService(OnePayContext context)
 {
     _context = context;
 }