/// <summary> /// Initializes a new instance of MailerQ Rest API Client /// </summary> /// <param name="options">MailerQ settings with API Url and Authorization Token</param> /// <param name="httpFactory">HttpClienFactory for create HttpClient objects</param> public RestApiClient( IOptions <MailerQConfiguration> options, IHttpClientFactory httpFactory) { _settings = options.Value; _httpFactory = httpFactory; }
public static IOptions <MailerQConfiguration> CreateOptions(string uri) { var messageStorageSettings = new MailerQConfiguration { MessageStorageUrl = uri }; return(Options.Create(messageStorageSettings)); }