Class LdClientAdapter
Adapts an LdClient to the requirements of LdAiClient.
Implements
Inherited Members
Namespace: LaunchDarkly.Sdk.Server.Ai.Adapters
Assembly: LaunchDarkly.ServerSdk.Ai.dll
Syntax
public class LdClientAdapter : ILaunchDarklyClient
Constructors
| Edit this page View SourceLdClientAdapter(LdClient)
Constructs the adapter from an existing client.
Declaration
public LdClientAdapter(LdClient client)
Parameters
Type | Name | Description |
---|---|---|
LdClient | client | the adapter |
Methods
| Edit this page View SourceGetLogger()
Returns a logger.
Declaration
public ILogger GetLogger()
Returns
Type | Description |
---|---|
ILogger | a logger |
JsonVariation(string, Context, LdValue)
Returns a JSON variation.
Declaration
public LdValue JsonVariation(string key, Context context, LdValue defaultValue)
Parameters
Type | Name | Description |
---|---|---|
string | key | the flag key |
Context | context | the context |
LdValue | defaultValue | the default value |
Returns
Type | Description |
---|---|
LdValue | the evaluation result |
Track(string, Context, LdValue, double)
Tracks a metric.
Declaration
public void Track(string name, Context context, LdValue data, double metricValue)
Parameters
Type | Name | Description |
---|---|---|
string | name | metric name |
Context | context | context |
LdValue | data | associated data |
double | metricValue | metric value |