Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET examples #7061

Merged
merged 3 commits into from
May 24, 2024
Merged

.NET examples #7061

merged 3 commits into from
May 24, 2024

Conversation

alvinometric
Copy link
Contributor

Another one for you @daveleek 🙏

Copy link

vercel bot commented May 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2024 11:39am
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2024 11:39am

Copy link
Contributor

@nnennandukwe nnennandukwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳 Great work!

Minor suggestions here to complement this examples doc:

  • Adding a link to the Examples doc in the .NET tutorial doc as part of this PR.
    In the tutorial conclusion, you could add at the bottom:

"Continue to our .NET Examples docs for more advanced applications of feature flags in .NET."

I think that's it from me! 👍

- [Configure strategy constraints for canary deployments](#configure-strategy-constraints-for-canary-deployments)
- [Server-side A/B Testing in .NET](#server-side-ab-testing-in-net)
- [Feature Flag Analytics and Reporting in .NET](#feature-flag-analytics-and-reporting-in-net)
- [Enable impression data events in .NET](#enable-impression-data-events-in-net)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the section linked to here, perhaps add an example of how to hook into the impression data events in the app using the SDK? Or is this article more about how to integrate with the admin API from .NET?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also just be a link to the relevant section in the repo/docs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daveleek I'll let Alvin know that it'd be good to add an example of using impression data events in the app as a fast-follow to this PR. Based off the docs we have on it https://docs.getunleash.io/reference/sdks/dotnet#handling-events

```csharp
HttpClient client = new HttpClient();

string url = "<your-unleash-url>/api/admin/projects/:projectId/features/:featureName/environments/:environment/strategies/:strategyId";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
string url = "<your-unleash-url>/api/admin/projects/:projectId/features/:featureName/environments/:environment/strategies/:strategyId";
string url = $"{unleashUrl}/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}";

Perhaps do something like this for these urls so if people copy+paste then they get build errors for missing parameters instead of weird responses from Unleash.

```csharp
HttpClient client = new HttpClient();

string url = "<your-unleash-url>/api/admin/projects/<your-project-id>/features/<your-feature-flag>/environments/<your-environment>/strategies/3a76899f-582b-422f-be72-34c995388f77";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here and for the urls further down. and you've accidentally included a reference to one of your own strategies here?

Copy link
Contributor

@daveleek daveleek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work @alvinometric! Couple of questions/thoughts around adding more context to impression events and urls with parameter placeholders but feel free to ignore!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants