Class Configuration
An immutable class containing configuration properties for EventSource.
Inherited Members
Namespace: LaunchDarkly.EventSource
Assembly: LaunchDarkly.EventSource.dll
Syntax
public sealed class Configuration
Fields
DefaultBackoffResetThreshold
The default value for BackoffResetThreshold(TimeSpan): one minute.
Declaration
public static readonly TimeSpan DefaultBackoffResetThreshold
Field Value
| Type | Description |
|---|---|
| TimeSpan |
DefaultConnectionTimeout
Obsolete name for DefaultResponseStartTimeout.
Declaration
[Obsolete("Use DefaultResponseStartTimeout")]
public static readonly TimeSpan DefaultConnectionTimeout
Field Value
| Type | Description |
|---|---|
| TimeSpan |
DefaultInitialRetryDelay
The default value for InitialRetryDelay(TimeSpan): one second.
Declaration
public static readonly TimeSpan DefaultInitialRetryDelay
Field Value
| Type | Description |
|---|---|
| TimeSpan |
DefaultLoggerName
The logger name that will be used if you specified a logging implementation but did not provide a specific logger instance.
Declaration
public const string DefaultLoggerName = "EventSource"
Field Value
| Type | Description |
|---|---|
| string |
See Also
DefaultMaxRetryDelay
The default value for MaxRetryDelay(TimeSpan): 30 seconds.
Declaration
public static readonly TimeSpan DefaultMaxRetryDelay
Field Value
| Type | Description |
|---|---|
| TimeSpan |
DefaultReadTimeout
The default value for ReadTimeout(TimeSpan): 5 minutes.
Declaration
public static readonly TimeSpan DefaultReadTimeout
Field Value
| Type | Description |
|---|---|
| TimeSpan |
DefaultResponseStartTimeout
The default value for ResponseStartTimeout(TimeSpan): 10 seconds.
Declaration
public static readonly TimeSpan DefaultResponseStartTimeout
Field Value
| Type | Description |
|---|---|
| TimeSpan |
Properties
BackoffResetThreshold
The amount of time a connection must stay open before the EventSource resets its backoff delay.
Declaration
public TimeSpan BackoffResetThreshold { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
See Also
ConnectionTimeout
Obsolete name for ResponseStartTimeout.
Declaration
[Obsolete("Use ResponseStartTimeout")]
public TimeSpan ConnectionTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
HttpClient
The HttpClient that will be used as the HTTP client, or null for a new HttpClient.
Declaration
public HttpClient HttpClient { get; }
Property Value
| Type | Description |
|---|---|
| HttpClient |
See Also
HttpMessageHandler
The HttpMessageHandler that will be used for the HTTP client, or null for the default handler.
Declaration
public HttpMessageHandler HttpMessageHandler { get; }
Property Value
| Type | Description |
|---|---|
| HttpMessageHandler |
See Also
HttpRequestModifier
Delegate hook invoked before an HTTP request has been performed.
Declaration
public Action<HttpRequestMessage> HttpRequestModifier { get; }
Property Value
| Type | Description |
|---|---|
| Action<HttpRequestMessage> |
See Also
InitialRetryDelay
The initial amount of time to wait before attempting to reconnect to the EventSource API.
Declaration
public TimeSpan InitialRetryDelay { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
See Also
LastEventId
Gets the last event identifier.
Declaration
public string LastEventId { get; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
Logger
The logger to be used for all EventSource log output.
Declaration
public Logger Logger { get; }
Property Value
| Type | Description |
|---|---|
| Logger |
Remarks
This is never null; if logging is not configured, it will be LaunchDarkly.Logging.Logs.None.
See Also
MaxRetryDelay
The maximum amount of time to wait before attempting to reconnect.
Declaration
public TimeSpan MaxRetryDelay { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
See Also
Method
The HTTP method that will be used when connecting to the EventSource API.
Declaration
public HttpMethod Method { get; }
Property Value
| Type | Description |
|---|---|
| HttpMethod |
See Also
PreferDataAsUtf8Bytes
Whether to use UTF-8 byte arrays internally if possible when reading the stream.
Declaration
public bool PreferDataAsUtf8Bytes { get; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
ReadTimeout
The timeout when reading from the EventSource API.
Declaration
public TimeSpan ReadTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
See Also
RequestBodyFactory
A factory for HTTP request body content, if the HTTP method is one that allows a request body. is one that allows a request body. This is in the form of a factory function because the request may need to be sent more than once.
Declaration
public Func<HttpContent> RequestBodyFactory { get; }
Property Value
| Type | Description |
|---|---|
| Func<HttpContent> |
See Also
RequestHeaders
The request headers to be sent with each EventSource HTTP request.
Declaration
public IDictionary<string, string> RequestHeaders { get; }
Property Value
| Type | Description |
|---|---|
| IDictionary<string, string> |
See Also
ResponseStartTimeout
The maximum amount of time to wait between starting an HTTP request and receiving the response headers.
Declaration
public TimeSpan ResponseStartTimeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
See Also
Uri
Gets the Uri used when connecting to an EventSource API.
Declaration
public Uri Uri { get; }
Property Value
| Type | Description |
|---|---|
| Uri |
Methods
Builder(Uri)
Provides a new ConfigurationBuilder for constructing a configuration.
Declaration
public static ConfigurationBuilder Builder(Uri uri)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | uri | the EventSource URI |
Returns
| Type | Description |
|---|---|
| ConfigurationBuilder | a new builder instance |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | if the URI is null |