public SendLogController(IAuthentication authentication, IGenerateQueryString generateQueryString, IGenerateUrl generateUrl, ISmsRequest smsRequest, ISmsLogger logger) { _authentication = authentication; _generateQueryString = generateQueryString; _generateUrl = generateUrl; _smsRequest = smsRequest; _logger = logger; }
public InjectOptions() { var appSettings = new ConfigurationBuilder() .AddJsonFile("appsettings.json", true, true) .Build(); Authentication = new Authentication(appSettings["AppSettings:Username"], appSettings["AppSettings:Password"]); GenerateQueryString = new GenerateQueryString(); GenerateUrl = new GenerateUrl(appSettings["AppSettings:SmsGateway"]); SmsRequest = new SmsRequest(appSettings["AppSettings:ReponseType"], appSettings["AppSettings:MockMode"]) { GenerateUrl = GenerateUrl, Authentication = Authentication }; SmsLogger = new SmsLogger(); }