This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
Releases: launchdarkly/dotnet-client-sdk
Releases · launchdarkly/dotnet-client-sdk
1.0.0
[1.0.0] - 2019-09-13
First GA release.
For release notes on earlier beta versions, see the beta changelog.
1.0.0-beta24
[1.0.0-beta24] - 2019-09-13
This is the last beta release. The GA release 1.0.0 will be identical to this, other than the version number. This release is listed separately so beta testers can see what changed since beta23. The CHANGELOG.md file will now be reset to include only GA releases.
Added:
LdValue
now has methods for converting to or from a list or dictionary, rather than using theNewtonsoft.Json
typesJArray
andJObject
.- HTML documentation for all public types, methods, and properties is now available online.
Changed:
- The new name of
ImmutableJsonValue
isLdValue
. - The SDK no longer has a dependency on
Xam.Plugin.DeviceInfo
. - When accessing a floating-point flag value with
IntVariation
, or converting a floating-pointLdValue
to anint
, it will now truncate (round toward zero) rather than rounding to the nearest integer. This is consistent with normal C# behavior and with most other LaunchDarkly SDKs.
Removed:
- All public methods and properties now use
LdValue
instead ofJToken
.
Fixed:
- Fixed a bug that caused a string flag value that is in an ISO date/time format, like "1970-01-01T00:00:01.001Z", to be treated as an incompatible type by
StringVariation
(becauseNewtonsoft.Json
would parse it as aDateTime
by default). - On Android, an HTTP connection timeout could leave a connection attempt still happening in the background-- even though the timeout would still happen normally as far as the SDK was concerned-- until the default timeout for the Android HTTP handler elapsed, which is 24 hours. Now it will properly stop the connection attempt after a timeout.
- Fixed an implementation problem that caused excessive overhead for flag evaluations due to unnecessary JSON parsing.
1.0.0-beta23
[1.0.0-beta23] - 2019-08-30
Added:
- XML documentation comments are now included in the package, so they should be visible in Visual Studio for all LaunchDarkly types and methods.
Changed:
- The
Online
property ofLdClient
was not useful because it could reflect either a deliberate change to whether the client is allowed to go online (that is, it would be false if you had setOffline
to true in the configuration), or a change in network availability. It has been removed and replaced withOffline
, which is only used for explicitly forcing the client to be offline. This is a read-only property; to set it, useSetOffline
orSetOfflineAsync
. - The synchronous
Identify
method now requires a timeout parameter, and returns false if it times out. LdClient.Initialized
is now a property, not a method.LdClient.Version
is now static, since it describes the entire package rather than a client instance.- In
Configuration
andIConfigurationBuilder
,HttpClientTimeout
is nowConnectionTimeout
. - There is now more debug-level logging for stream connection state changes.
Fixed:
- Network availability changes are now detected in both Android and iOS. The SDK should not attempt to connect to LaunchDarkly if the OS has told it that the network is unavailable.
- Background polling was never enabled, even if
Configuration.EnableBackgroundUpdating
was true. - When changing from offline to online by setting
client.Online = true
, or callingawait client.SetOnlineAsync(true)
(the equivalent now would beclient.Offline = false
, etc.), the SDK was returning too soon before it had acquired flags from LaunchDarkly. The known issues in 1.0.0-beta22 have been fixed. - If the SDK was online and then was explicitly set to be offline, or if network connectivity was lost, the SDK was still attempting to send analytics events. It will no longer do so.
- If the SDK was originally set to be offline and then was put online, the SDK was not sending analytics events. Now it will.
Removed:
ConfigurationBuilder.UseReport
. Due to an issue with the Android implementation of HTTP, the HTTP REPORT method is not currently usable in the Xamarin SDK.IConnectionManager
interface. The SDK now always uses a platform-appropriate implementation of this logic.
1.0.0-beta22
[1.0.0-beta22] - 2019-08-12
Changed:
- By default, on Android and iOS the SDK now uses Xamarin's platform-specific implementations of
HttpMessageHandler
that are based on native APIs, rather than the basicSystem.Net.Http.HttpClientHandler
. This improves performance and stability on mobile platforms. - The behavior of the
Initialized()
method has changed to be more consistent with the other SDKs. Rather than only being true if there is currently an active connection to LaunchDarkly, it is now also true if you configured it in offline mode so that it will not attempt to connect to LaunchDarkly; in other words, it is only false if it has tried to connect and not yet succeeded. - Also, instead of always returning default values whenever
Initialized()
is false, the SDK now returns a default value only if it does not already have a cached value for the flag. It will always use cached values if it has obtained any (for the current user).
Known issues:
- Changing the
Online
property does not wait for the connection state to be updated; that is, if you were offline and then setOnline = true
, flag values may not be immediately available. It is equivalent to callingSetOnlineAsync(true)
but not waiting for the result. - Starting with the configuration
Offline(true)
and then going online does not work. - On mobile platforms, the SDK may not detect when network availability has changed. This means that if the network is unavailable, it may waste some CPU time on trying and failing to reconnect to LaunchDarkly.
1.0.0-beta21
[1.0.0-beta21] - 2019-08-06
Added:
Configuration.Builder
provides a fluent builder pattern for constructingConfiguration
objects. This is now the only method for building a configuration if you want to set properties other than the SDK key.ImmutableJsonValue.Null
(equivalent toImmutableJsonValue.Of(null)
).LdClient.PlatformType
.- Verbose debug logging for stream connections.
Changed:
Configuration
objects are now immutable.- In
Configuration
,EventQueueCapacity
andEventQueueFrency
have been renamed toEventCapacity
andEventFlushInterval
, for consistency with other LaunchDarkly SDKs. ImmutableJsonValue.FromJToken()
was renamed toImmutableJsonValue.Of()
.- In
FlagChangedEventArgs
,NewValue
andOldValue
now have the typeImmutableJsonValue
instead ofJToken
. ILdMobileClient
is now namedILdClient
.
Fixed:
- Fixed a bug where setting a user's custom attribute to a null value could cause an exception during JSON serialization of event data.
Removed:
ConfigurationExtensions
(useConfiguration.Builder
).Configuration.SamplingInterval
.UserExtensions
(useUser.Builder
).User
constructors (useUser.WithKey
orUser.Builder
).User
property setters.IBaseConfiguration
andICommonLdClient
interfaces.
[1.0.0-beta20] - 2019-08-06
Incomplete release, replaced by beta21.
1.0.0-beta20
[1.0.0-beta20] - 2019-08-06
Incomplete release, replaced by beta21.
1.0.0-beta19
[1.0.0-beta19] - 2019-07-31
Added:
User.Builder
provides a fluent builder pattern for constructingUser
objects. This is now the only method for building a user if you want to set properties other thanKey
.- The
ImmutableJsonValue
type provides a wrapper for the Newtonsoft.Json types that prevents accidentally modifying JSON object properties or array values that are shared by other objects. LdClient.PlatformType
allows you to verify that you have loaded the correct target platform version of the SDK.
Changed:
User
objects are now immutable.- In
User
,IpAddress
has been renamed toIPAddress
(standard .NET capitalization for two-letter acronyms). - Custom attribute values in
User.Custom
are now returned asImmutableJsonValue
rather thanJToken
. - JSON flag variations returned by
JsonVariation
,JsonVariationDetail
, andAllFlags
, are nowImmutableJsonValue
rather thanJToken
. - Setting additional data in a custom event with
Track
now usesImmutableJsonValue
rather thanJToken
. - The mechanism for specifying a flag change listener has been changed to use the standard .NET event pattern. Instead of
client.RegisterFeatureFlagListener("flag-key", handler)
(wherehandler
is an instance of some class that implements a particular interface), it is nowclient.FlagChanged += handler
(wherehandler
is an event handler method or function that will receive the flag key as part ofFlagChangedEventArgs
). - Flag change listeners are now invoked asynchronously. This is to avoid the possibility of a deadlock if, for instance, application code triggers an action (such as Identify) that causes flags to be updated, which causes a flag change listener to be called, which then tries to access some resource that is being held by that same application code (e.g. trying to do an action on the main thread). On Android and iOS, these listeners are now guaranteed to be executed on the main thread, but only after any other current action on the main thread has completed. On .NET Standard, they are executed asynchronously with
Task.Run()
.
Fixed:
- Previously, if you created a client with
LdClient.Init
and then calledDispose()
on the client, it would fail because the SDK would think a singleton instance already exists. Now, disposing of the singleton returns the SDK to a state where you can create a client again. - Fixed a
NullReferenceException
that could sometimes be thrown when transitioning from background to foreground in Android.
Removed:
User
constructors (useUser.WithKey
orUser.Builder
).User.IpAddress
(useIPAddress
).User
property setters, and theUserExtension
methods for modifying properties (AndName()
, etc.).
1.0.0-beta18
[1.0.0-beta18] - 2019-07-02
Added:
- New
Configuration
propertyPersistFlagValues
(default: true) allows you to turn off the SDK's normal behavior of storing flag values locally so they can be used offline. - Flag values are now stored locally in .NET Standard by default, on the filesystem, using the .NET
IsolatedStorageFile
mechanism. - Added CI unit test suites that exercise most of the SDK functionality in .NET Standard, Android, and iOS. The tests do not currently cover background-mode detection and network connectivity detection on mobile platforms.
Changed:
Configuration.WithUpdateProcessor
has been replaced withConfiguration.WithUpdateProcessorFactory
. These methods are for testing purposes and will not normally be used.
Fixed:
- In .NET Standard, if you specify a user with
Key == null
andAnonymous == true
, the SDK now generates a GUID for a user key and caches it in local storage for future reuse. This is consistent with the other client-side SDKs. Previously, it caused an exception.
Removed:
- Several low-level component interfaces such as
IDeviceInfo
which had been exposed for testing are now internal.
1.0.0-beta17
[1.0.0-beta17] - 2019-05-15
Changed:
- The NuGet package name for this SDK is now
LaunchDarkly.XamarinSdk
. There are no other changes. SubstitutingLaunchDarkly.Xamarin
1.0.0-beta16 withLaunchDarkly.XamarinSdk
1.0.0-beta17 should not affect functionality.
1.0.0-beta16
[1.0.0-beta16] - 2019-04-05
Added:
- In Android and iOS, when an app is in the background, the SDK should turn off the streaming connection and instead poll for flag updates at an interval determined by
Configuration.BackgroundPollingInterval
(default: 60 minutes). - The SDK now supports evaluation reasons. See
Configuration.WithEvaluationReasons
andILdMobileClient.BoolVariationDetail
. - The SDK now sends custom attributes called
os
anddevice
as part of the user data, indicating the user's platform and OS version. This is the same as what the native Android and iOS SDKs do, except that "iOS" or "Android" is also prepended to theos
property.
Changed:
- This is the first version that is built specifically for iOS and Android platforms. There is also still a .NET Standard 1.0 build in the same package.
- The SDK no longer uses Xamarin Essentials.
Fixed:
- Under some circumstances, a
CancellationTokenSource
object could be leaked.