public TemplateFormatterClient(string serviceUrl, ILog log) { if (string.IsNullOrWhiteSpace(serviceUrl)) { throw new ArgumentException("Value cannot be null or whitespace.", nameof(serviceUrl)); } _log = log ?? throw new ArgumentNullException(nameof(log)); _service = new EmailFormattingService(new Uri(serviceUrl)); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ApiIsAliveGetAsync(this IEmailFormattingService operations, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ApiIsAliveGetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='caseId'> /// </param> /// <param name='partnerId'> /// </param> /// <param name='language'> /// </param> /// <param name='parameters'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EmailFormatResponse> ApiFormatterByCaseIdByPartnerIdByLanguagePostAsync(this IEmailFormattingService operations, string caseId, string partnerId, string language, IDictionary <string, string> parameters = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ApiFormatterByCaseIdByPartnerIdByLanguagePostWithHttpMessagesAsync(caseId, partnerId, language, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> public static void ApiIsAliveGet(this IEmailFormattingService operations) { operations.ApiIsAliveGetAsync().GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='caseId'> /// </param> /// <param name='partnerId'> /// </param> /// <param name='language'> /// </param> /// <param name='parameters'> /// </param> public static EmailFormatResponse ApiFormatterByCaseIdByPartnerIdByLanguagePost(this IEmailFormattingService operations, string caseId, string partnerId, string language, IDictionary <string, string> parameters = default(IDictionary <string, string>)) { return(operations.ApiFormatterByCaseIdByPartnerIdByLanguagePostAsync(caseId, partnerId, language, parameters).GetAwaiter().GetResult()); }