Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
        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());

        }
Ejemplo n.º 3
0
 public SeqConnection(string serverUrl, string apiKey, bool useDefaultCredentials)
 {
     if (serverUrl == null)
     {
         throw new ArgumentNullException(nameof(serverUrl));
     }
     Client = new SeqApiClient(serverUrl, apiKey, useDefaultCredentials);
 }
Ejemplo n.º 4
0
        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());
        }