public InvestmentTargetManager(IUnitOfWork unitOfWork, IUserManager userManager, ISMSGateway smsGateway, IInvestmentTargetCMSManager investmentTargetCMSManager) { _unitOfWork = unitOfWork; _userManager = userManager; _smsGateway = smsGateway; _investmentTargetCMSManager = investmentTargetCMSManager; }
public ActionResult <string> SendMessage(Message message) { ISMSGateway gateway = null; switch (Configuration.GetValue <string>("type")) { case "Computopic": gateway = new ComputopicGateway(Configuration.GetValue <string>("username"), Configuration.GetValue <string>("password")); break; default: log.Error("Unknown gateway type " + Configuration.GetValue <string>("type")); return(BadRequest("No Gateway mapping found")); } if (message.numbers == null || message.numbers.Count == 0) { return(BadRequest("No numbers supplied")); } SanatizeNumbers(message); bool status = gateway.SendSMS(message); if (!status) { return(BadRequest("Message not send!")); } return("OK"); }
public ZahtevZaPosetuService(IMapper mapper, HealthCare020DbContext dbContext, IPropertyMappingService propertyMappingService, IPropertyCheckerService propertyCheckerService, IHttpContextAccessor httpContextAccessor, IAuthService authService, ISMSGateway smsGateway) : base(mapper, dbContext, propertyMappingService, propertyCheckerService, httpContextAccessor, authService) { _smsGateway = smsGateway; }
static void Main(string[] args) { Console.Title = "GatewayHost"; ShieldingCloseButton(); SetConsoleCtrlHandler(cancelHandler, true); Console.WriteLine(DateTime.Now.ToString() + " Starting the server ..."); GatewayName = System.Configuration.ConfigurationManager.AppSettings["GatewayName"]; Console.Title = "GatewayHost - " + GatewayName; Console.WriteLine(DateTime.Now.ToString() + " Loading the keyword ..."); IKeywordLoad kl = new KeywordLoad(GatewayName); Keyword keyword = new Keyword(kl); processKeyword = new SimpleKeyword(keyword); Console.WriteLine(DateTime.Now.ToString() + " Loading the keyword ok."); Console.WriteLine(DateTime.Now.ToString() + " Initialize the server ..."); string gatewayType = System.Configuration.ConfigurationManager.AppSettings["GatewayType"]; if (gatewayType.ToLower() == "http") //普通http接口 { Gateway = new HttpGateway(GatewayName); } else if (gatewayType.ToLower() == "httppush") //推送状态报告和上行 { Gateway = new HttpPushGateway(GatewayName); } else if (gatewayType.ToLower() == "httpsdl") //四大类 { Gateway = new HttpSDLGateway(GatewayName); } Gateway.SMSEvent += Gateway_SMSEvent; Gateway.SendEvent += Gateway_SendEvent; Gateway.ReportEvent += Gateway_ReportEvent; Gateway.DeliverEvent += Gateway_DeliverEvent; Gateway.Connect(); Thread.Sleep(1000); frSMS = new RabbitMQHelper(AppConfig.MQHost, AppConfig.MQVHost, AppConfig.MQUserName, AppConfig.MQPassword); frSMS.OnSubsribeMessageRecieve += frSMS_ReceiveMessage; frSMS.SubsribeMessage(GatewayName, AppConfig.MaxPriority); Console.WriteLine(DateTime.Now.ToString() + " Initialize the server ok."); Console.WriteLine(DateTime.Now.ToString() + " Started the server ok."); Console.WriteLine(); Console.WriteLine("Press input 'quit' to stop it!"); do { } while (Console.ReadLine() != "quit"); frSMS.Close(); Gateway.Close(); Console.WriteLine("The server was stopped,press any key to exit!"); Console.ReadKey(); Environment.Exit(0); }
public VerifyApiController(IUserService userService, IFundTransactionHistoryService fundTransactionHistoryService, InvestmentTargetService investmentTargetService, IConfiguration configuration, ISMSGateway smsGateway, ITransactionHistoryService transactionHistoryService, IOrderService orderService, IGlobalConfigurationService globalConfigurationService) { _userService = userService; _fundTransactionHistoryService = fundTransactionHistoryService; _configuration = configuration; _investmentTargetService = investmentTargetService; _smsGateway = smsGateway; _transactionHistoryService = transactionHistoryService; _orderService = orderService; _globalConfigurationService = globalConfigurationService; }
public WithdrawalController(IUserService userService, IFundTransactionHistoryService fundTransactionHistoryService, IInvestmentTargetService investmentTargetService, IConfiguration configuration, ISMSGateway smsGateway, IWithdrawFeeService withdrawFeeService, IViettelPay viettelPay, IOrderRequestService orderRequestService, IGlobalConfigurationService globalConfigurationService) { _userService = userService; _fundTransactionHistoryService = fundTransactionHistoryService; _configuration = configuration; _investmentTargetService = investmentTargetService; _smsGateway = smsGateway; _withdrawFeeService = withdrawFeeService; _viettelPay = viettelPay; _orderRequestService = orderRequestService; _globalConfigurationService = globalConfigurationService; }
public AccountController(IUserService userService, IEmailSender emailSender, IConfiguration configuration, ISMSGateway smsGateway, IKVRRService kvrrService, IKVRRQuestionAnswerService kVRRQuestionAnswerService, IFundTransactionHistoryService fundTransactionHistoryService , IContentNewsService newsService, ITransactionHistoryService transactionHistoryService, IGlobalConfigurationService globalConfigurationService) { _userService = userService; _emailSender = emailSender; _configuration = configuration; _smsGateway = smsGateway; _kvrrService = kvrrService; _kVRRQuestionAnswerService = kVRRQuestionAnswerService; _fundTransactionHistoryService = fundTransactionHistoryService; _transactionHistoryService = transactionHistoryService; _globalConfigurationService = globalConfigurationService; _newsService = newsService; }
public SMSService(ISMSGateway gateway) { this.gateway = gateway; }