/// <summary> /// Construct a <see cref="SeqConnection"/>. /// </summary> /// <param name="serverUrl">The base URL of the Seq server.</param> /// <param name="apiKey">An API key to use when making requests to the server, if required.</param> /// <param name="configureHttpClientHandler">An optional callback to configure the <see cref="HttpClientHandler"/> used when making HTTP requests /// to the Seq API.</param> public SeqConnection(string serverUrl, string apiKey = null, Action <HttpClientHandler> configureHttpClientHandler = null) { if (serverUrl == null) { throw new ArgumentNullException(nameof(serverUrl)); } Client = new SeqApiClient(serverUrl, apiKey, configureHttpClientHandler); }
public SeqConnection(string serverUrl, string apiKey = null) { if (serverUrl == null) throw new ArgumentNullException(nameof(serverUrl)); _client = new SeqApiClient(serverUrl, apiKey); _root = new Lazy<Task<RootEntity>>(() => _client.GetRootAsync()); }
public SeqConnection(string serverUrl, string apiKey, bool useDefaultCredentials) { if (serverUrl == null) { throw new ArgumentNullException(nameof(serverUrl)); } Client = new SeqApiClient(serverUrl, apiKey, useDefaultCredentials); }
public SeqConnection(string serverUrl, string apiKey = null) { if (serverUrl == null) { throw new ArgumentNullException(nameof(serverUrl)); } _client = new SeqApiClient(serverUrl, apiKey); _root = new Lazy <Task <RootEntity> >(() => _client.GetRootAsync()); }