Skip to content

Commit 161f3f2

Browse files
committed
Replace parameterless constructor with property defaults
1 parent e3635b8 commit 161f3f2

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ public class FlagsmithConfiguration
1010
{
1111
private static readonly Uri DefaultApiUri = new Uri("https://edge.api.flagsmith.com/api/v1/");
1212
private TimeSpan _timeout;
13-
public FlagsmithConfiguration()
14-
{
15-
ApiUri = DefaultApiUri;
16-
EnvironmentKey = string.Empty;
17-
EnvironmentRefreshIntervalSeconds = 60;
18-
}
1913

2014
/// <summary>
2115
/// <para>Override the URL of the Flagsmith API to communicate with.</para>
@@ -33,7 +27,7 @@ public string ApiUrl
3327
/// <c>https://edge.api.flagsmith.com/api/v1/</c>.
3428
/// <example><code>new Uri("https://flagsmith.example.com/api/v1/")</code></example>
3529
/// </summary>
36-
public Uri ApiUri { get; set; }
30+
public Uri ApiUri { get; set; } = DefaultApiUri;
3731

3832
/// <summary>
3933
/// The environment key obtained from Flagsmith interface.
@@ -54,6 +48,7 @@ public bool EnableClientSideEvaluation
5448
/// Enables local evaluation of flags.
5549
/// </summary>
5650
public bool EnableLocalEvaluation { get; set; }
51+
5752
/// <summary>
5853
/// <para>If using local evaluation, specify the interval period between refreshes of local environment data.</para>
5954
/// <para>Deprecated since 7.1.0. Use <see cref="EnvironmentRefreshInterval"/> instead.</para>

Flagsmith.FlagsmithClient/PollingManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public PollingManager(Func<Task> callback, int intervalSeconds = 10)
2323
this._callback = callback;
2424
_interval = TimeSpan.FromSeconds(intervalSeconds);
2525
}
26-
26+
2727
/// <param name="callback">Awaitable function that will be polled.</param>
2828
/// <param name="timespan">Polling interval.</param>
2929
public PollingManager(Func<Task> callback, TimeSpan timespan)

0 commit comments

Comments
 (0)