Repository navigation
Give the .NET example the _51DEGREES_ variable names alongside the old ones - #25
Merged
Merged
Conversation
The .NET cloud web example reads the resource key from _51DEGREES_RESOURCE_KEY and the cloud endpoint from _51DEGREES_CLOUD_ENDPOINT, with no other name, once its rename is released.
The .NET cloud web example now reads the resource key from _51DEGREES_RESOURCE_KEY and the endpoint from _51DEGREES_CLOUD_ENDPOINT, with no other name. Released versions of it read SUPER_RESOURCE_KEY and FIFTYONE_CLOUD_ENDPOINT, so the harness sets both pairs until every language has released with the new names.
This was referenced Nov 11, 2026
jwrosewell
marked this pull request as ready for review
November 11, 2026 14:44
Merged
jwrosewell
added a commit
that referenced
this pull request
Nov 11, 2026
* Find the Java example in 51degrees-java (#16) * Find the dotnet example in 51degrees-dotnet (#17) device-detection-dotnet-examples has moved into 51degrees-dotnet, under examples/device-detection. Both dotnet demos, pmp-web and GettingStarted-Web, are found there as siblings, and the docs name the monorepo. * Find the Node example in 51degrees-node (#18) * Find the Node example in 51degrees-node * Copy the monorepo packages in when installing the Node example * Check that only rc merges into the default branch (#19) * Find the Python example in 51degrees-python (#20) * Find the PHP example in 51degrees-php (#21) * Java uses the default JSON endpoint and still accepts the old one (#23) * Let Java use the default JSON endpoint and still accept its old one * Say once which JSON path each language uses * Give the .NET example the _51DEGREES_ variable names alongside the old ones (#25) * Test that the .NET example is given the underscore variable names The .NET cloud web example reads the resource key from _51DEGREES_RESOURCE_KEY and the cloud endpoint from _51DEGREES_CLOUD_ENDPOINT, with no other name, once its rename is released. * Give the .NET example the _51DEGREES_ variable names The .NET cloud web example now reads the resource key from _51DEGREES_RESOURCE_KEY and the endpoint from _51DEGREES_CLOUD_ENDPOINT, with no other name. Released versions of it read SUPER_RESOURCE_KEY and FIFTYONE_CLOUD_ENDPOINT, so the harness sets both pairs until every language has released with the new names. --------- Co-authored-by: ben51degrees <ben@51degrees.com> Co-authored-by: Jamesr51d <122470673+Jamesr51d@users.noreply.github.com> Co-authored-by: Eugene Dorfman <justadreamer2007@gmail.com>
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.
The problem
51degrees-dotnet#131 gives every 51Degrees environment variable in .NET one
_51DEGREES_name, with nothing read in its place. Once it merges, the .NET cloud web example (examples/device-detection/Cloud/GettingStarted-Web) reads its resource key only from_51DEGREES_RESOURCE_KEYand its cloud endpoint only from_51DEGREES_CLOUD_ENDPOINT.This harness starts that example with
SUPER_RESOURCE_KEYandFIFTYONE_CLOUD_ENDPOINT(Examples/ExampleApps.cslines 241 and 243 at 345a4a64), which is how the cloud service's own tests run the .NET example. After 51degrees-dotnet#131 the example would start with no resource key and the public cloud endpoint, so those tests would fail.No specification page covers these names. They are the agreed 51Degrees environment variable names that every language is moving to, as 51degrees-rust#378 did for Rust.
What changes
ExampleApps.cssets_51DEGREES_RESOURCE_KEYand_51DEGREES_CLOUD_ENDPOINTfor the .NET example, with the same values as before.SUPER_RESOURCE_KEYandFIFTYONE_CLOUD_ENDPOINTtoo, because the harness also runs released versions of the example, which read only those names. Setting both pairs works with either version.Examples/ExampleAppsTests.csgainsDescriptors_Dotnet_SetsTheUnderscoreNames, which builds the .NET descriptor's environment and checks both new names and their values, the endpoint with itsapi/v4/path.Nothing changes for the other languages' descriptors.
How it was checked
The test commit went first, so this pull request's first build shows it failing.
Descriptors_Dotnet_SetsTheUnderscoreNamesfails with "The given key '_51DEGREES_RESOURCE_KEY' was not present in the dictionary." The browser jobs passbuild-and-testpasses, 40 tests with 15 skipped (the tests that need a browser, the cloud or keys, which that job leaves out), and the browser job passes on all three runnersThis repository's own build is the full build for it. It has no macOS entries.
What remains
_51DEGREES_names, because until then the harness runs examples that read either set. #26 tracks taking them out.51DEGREES_RESOURCE_KEYand51DEGREES_CLOUD_ENDPOINT, for the 51Did browser demo, inBrowser51Did/Harness.cs(lines 60, 84 to 87, 118 to 119, 426 and 574),Browser51Did/Demo.cs(lines 102 to 104),Browser51Did/README.md(lines 81 to 83) andREADME.md(line 55). A POSIX shell cannot set such a name. It belongs in a separate change, made in step with the language demos that read those names.rc, as #23 was. The language repositories' full builds clone the contract tests frommain, so the change reaches them oncercmerges intomain, and it has to reachmainbefore 51degrees-dotnet#131 merges.Version
No version change.