Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
docs: update config example in LDClient constructor docs (#224)
Browse files Browse the repository at this point in the history
**Requirements**

- [ ] I have added test coverage for new or changed functionality
- [x] I have followed the repository's [pull request submission
guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
- [ ] I have validated my changes against all supported platform
versions

**Related issues**

Followup to [this
discussion](https://github.com/launchdarkly/ld-docs-private/pull/4382/files#r1619543723)
in launchdarkly/ld-docs-private#4382, which
clarified that this example is out of date.

**Describe the solution you've provided**

Update the code sample in the LDClient constructor API docs to use
`.Events` correctly.

**Describe alternatives you've considered**

If this seems confusing or too much, we could also just remove lines
124-128, and build the `Configuration` without setting any options:

```
var config = Configuration.Builder("my-sdk-key").Build();
var client = new LDClient(config);
```

**Additional context**

previously opened as
launchdarkly/dotnet-server-sdk-private#340
  • Loading branch information
mmrj authored May 31, 2024
1 parent 3254dda commit 6efa8d7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkgs/sdk/server/src/LdClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,7 @@ public sealed class LdClient : IDisposable, ILdClient
/// <param name="config">a client configuration object (which includes an SDK key)</param>
/// <example>
/// <code>
/// var config = Configuration.Builder("my-sdk-key")
/// .AllAttributesPrivate(true)
/// .EventCapacity(1000)
/// .Build();
/// var config = Configuration.Builder("my-sdk-key").Build();
/// var client = new LDClient(config);
/// </code>
/// </example>
Expand Down

0 comments on commit 6efa8d7

Please sign in to comment.