Class SeriesDataBuilder
Builder for constructing series data, which is passed to between Hook methods.
Use of this builder is optional; it is provided for convenience.
// ImmutableDictionary passed into Hook method:
var data = ...
// Add a new key and return an updated dictionary:
return new SeriesDataBuilder(data).Set("key", "value").Build();
Inherited Members
Namespace: LaunchDarkly.Sdk.Server.Hooks
Assembly: LaunchDarkly.ServerSdk.dll
Syntax
public sealed class SeriesDataBuilder
  Constructors
| Edit this page View SourceSeriesDataBuilder()
Constructs a new builder with empty series data.
Declaration
public SeriesDataBuilder()
  SeriesDataBuilder(ImmutableDictionary<string, object>)
Constructs a new builder from pre-existing series data.
Declaration
public SeriesDataBuilder(ImmutableDictionary<string, object> dictionary)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ImmutableDictionary<string, object> | dictionary | pre-existing series data  | 
      
Methods
| Edit this page View SourceBuild()
Returns a SeriesData based on the current state of the builder.
Declaration
public ImmutableDictionary<string, object> Build()
  Returns
| Type | Description | 
|---|---|
| ImmutableDictionary<string, object> | new series data  | 
      
Set(string, object)
Sets a key-value pair.
Declaration
public SeriesDataBuilder Set(string key, object value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | key | key of value  | 
      
| object | value | the value to set  | 
      
Returns
| Type | Description | 
|---|---|
| SeriesDataBuilder | this builder  |