Esempio n. 1
0
 /// <summary>
 /// Creates a Rest client using the specified <paramref name="hostUrl"/> and <paramref name="settings"/>.
 /// </summary>
 /// <typeparam name="T">The interface of the Rest client.</typeparam>
 /// <param name="hostUrl">The host url.</param>
 /// <param name="settings">The optional settings.</param>
 /// <returns></returns>
 public static T For <T>(string hostUrl, RestSettings settings = null)
     where T : class
 {
     return(RestClientFactory.Create <T>(hostUrl, settings));
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a Rest client using the specified <paramref name="httpClient"/> and <paramref name="settings"/>.
 /// </summary>
 /// <typeparam name="T">The interface of the Rest client.</typeparam>
 /// <param name="httpClient">The http client.</param>
 /// <param name="settings">The optional settings.</param>
 /// <returns></returns>
 public static T For <T>(HttpClient httpClient, RestSettings settings = null)
     where T : class
 {
     return(RestClientFactory.Create <T>(httpClient, settings));
 }