docs: fix Configuration.Builder examples to include AutoEnvAttributes parameter#236
Merged
kinyoklion merged 2 commits intomainfrom Mar 24, 2026
Merged
Conversation
… parameter Co-Authored-By: rlamb@launchdarkly.com <kingdewman@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
kinyoklion
commented
Mar 21, 2026
pkgs/sdk/client/src/Components.cs
Outdated
| /// <example> | ||
| /// <code> | ||
| /// var config = Configuration.Builder(sdkKey) | ||
| /// var config = Configuration.Builder(sdkKey, AutoEnvAttributes.Enabled) |
Member
Author
There was a problem hiding this comment.
Does this need to be ConfigurationBuilder.AutoEnvAttributes.Enabled?
Contributor
There was a problem hiding this comment.
Good catch — you're right, AutoEnvAttributes is a nested enum inside ConfigurationBuilder, so the short form doesn't compile. I've pushed a fix using the fully-qualified ConfigurationBuilder.AutoEnvAttributes.Enabled in all doc examples. Verified it compiles with a temporary test project.
…led in examples Co-Authored-By: rlamb@launchdarkly.com <kingdewman@gmail.com>
keelerm84
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements
Related issues
N/A — identified during a documentation audit of client-side SDK examples.
Describe the solution you've provided
All
Configuration.Buildercode examples in the client SDK's XML doc comments were using the outdated single-parameter signature (Configuration.Builder(key)), which no longer compiles. The current builder requires anAutoEnvAttributesparameter.This PR updates every affected doc example across 12 source files in
pkgs/sdk/client/src/to use the fully-qualified formConfigurationBuilder.AutoEnvAttributes.Enabled, sinceAutoEnvAttributesis a nested enum insideConfigurationBuilderand the short form does not resolve without ausing staticdirective.Describe alternatives you've considered
AutoEnvAttributes.Enabled— does not compile without ausing staticimport, which would be misleading in doc examples.Additional context
Key items for review:
Configuration.Builder(key)examples were missed. A grep for the single-argument pattern againstpkgs/sdk/client/src/returns zero results after this change.Components.Plugins()example already had the correct two-argument signature and was intentionally left unchanged.Human review checklist
ConfigurationBuilder.AutoEnvAttributes.Enabledis the preferred form for doc examples (vs. adding ausing staticimport to examples)grep -r 'Configuration.Builder(sdkKey)' pkgs/sdk/client/src/andgrep -r 'Configuration.Builder(mobileKey)' pkgs/sdk/client/src/should return zero non-qualified resultsAllAttributesPrivate,StartWaitTimeon the builder) — those are out of scope for this PRUpdates since last revision
Changed all examples from the short form
AutoEnvAttributes.Enabledto the fully-qualifiedConfigurationBuilder.AutoEnvAttributes.Enabled, per reviewer feedback. Verified compilation with a temporary test project that exercises all updated patterns.Link to Devin session: https://app.devin.ai/sessions/c465b9ad05c7492880221b219b299142
Requested by: @kinyoklion