public VstsClient(string instanceName, IHttpClient client, VstsClientConfiguration configuration, ILogger <VstsClient> logger) { _instanceName = instanceName; _httpClient = client; _logger = logger; Configuration = configuration; }
public VstsClient(IVstsUrlBuilderFactory urlBuilderFactory, IHttpClient client, VstsClientConfiguration configuration, ILogger <VstsClient> logger) { _urlBuilderFactory = urlBuilderFactory; _httpClient = client; _logger = logger; Configuration = configuration; }
public static VstsClient Get(string instanceName, string accessToken, VstsClientConfiguration configuration = null, ILogger <VstsClient> logger = null) { var client = HttpClientUtil.Create(accessToken); var httpClient = new DefaultHttpClient(client, new NullLogger <DefaultHttpClient>()); var clientLogger = logger ?? new NullLogger <VstsClient>(); return(new VstsClient(instanceName, httpClient, configuration ?? VstsClientConfiguration.Default, logger ?? clientLogger)); }
public VstsClient(string instanceName, IHttpClient client, VstsClientConfiguration configuration) : this(instanceName, client, configuration, new NullLogger <VstsClient>()) { }
public static VstsClient Get(IVstsUrlBuilderFactory urlBuilderFactory, string accessToken, VstsClientConfiguration configuration = null, ILogger <VstsClient> logger = null) { var client = HttpClientUtil.Create(accessToken); var httpClient = new DefaultHttpClient(client, new NullLogger <DefaultHttpClient>()); var clientLogger = logger ?? new NullLogger <VstsClient>(); return(new VstsClient(urlBuilderFactory, httpClient, configuration ?? VstsClientConfiguration.Default, logger ?? clientLogger)); }
public VstsClient(IVstsUrlBuilderFactory urlBuilderFactory, IHttpClient client, VstsClientConfiguration configuration) : this(urlBuilderFactory, client, configuration, new NullLogger <VstsClient>()) { }
private static VstsClient CreateVstsClient(string instanceName, IServiceProvider ctx, VstsClientConfiguration config) { var client = ctx.GetService <IHttpClient>(); var logger = ctx.GetService <ILogger <VstsClient> >(); return(new VstsClient(instanceName, client, config, logger)); }