Show / Hide Table of Contents

Class FlagValueChangeEvent

A parameter class used with FlagValueChangeHandler(String, Context, EventHandler<FlagValueChangeEvent>).

Inheritance
System.Object
FlagValueChangeEvent
Namespace: LaunchDarkly.Sdk.Server.Interfaces
Assembly: LaunchDarkly.ServerSdk.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)

Constructs a new instance.

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

the key of the feature flag whose configuration has changed

LdValue oldValue

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

LdValue newValue

he new value of the flag for the specified user

Properties

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