Show / Hide Table of Contents

Class FlagValueChangeEvent

A parameter class used with FlagValueChanged.

Inheritance
System.Object
FlagValueChangeEvent
Namespace: LaunchDarkly.Sdk.Client.Interfaces
Assembly: LaunchDarkly.ClientSdk.dll
Syntax
public sealed class FlagValueChangeEvent : ValueType
Remarks

This is not an analytics event to be sent to LaunchDarkly; it is a notification to the application.

Constructors

FlagValueChangeEvent(String, LdValue, LdValue, Boolean)

Constructs a new instance.

Declaration
public FlagValueChangeEvent(string key, LdValue oldValue, LdValue newValue, bool deleted)
Parameters
Type Name Description
System.String key

the key of the feature flag whose configuration has changed

LdValue oldValue

the last known value of the flag for the specified user prior to the update

LdValue newValue

the new value of the flag for the specified user

System.Boolean deleted

true if the flag was deleted

Properties

Deleted

True if the flag was completely removed from the environment.

Declaration
public bool Deleted { get; }
Property Value
Type Description
System.Boolean

Key

The key of the feature flag whose configuration has changed.

Declaration
public string Key { get; }
Property Value
Type Description
System.String
Remarks

The specified flag may have been modified directly, or this may be an indirect change due to a change in some other flag that is a prerequisite for this flag, or a user segment that is referenced in the flag's rules.

NewValue

The new value of the flag for the specified user.

Declaration
public LdValue NewValue { get; }
Property Value
Type Description
LdValue
Remarks

Since flag values can be of any JSON data type, this is represented as LdValue. That class has properties for converting to other .NET types, such as AsBool.

If the flag was deleted or could not be evaluated, this will be Null. there is no application default value parameter as there is for the Variation methods; it is up to your code to substitute whatever fallback value is appropriate.

OldValue

The last known value of the flag for the specified user prior to the update.

Declaration
public LdValue OldValue { get; }
Property Value
Type Description
LdValue
Remarks

Since flag values can be of any JSON data type, this is represented as LdValue. That class has properties for converting to other .NET types, such as AsBool.

If the flag was deleted or could not be evaluated, this will be Null. there is no application default value parameter as there is for the Variation methods; it is up to your code to substitute whatever fallback value is appropriate.

In This Article
Back to top Generated by DocFX