Skip to content

docs: Add .NET 10 Console sample application#722

Merged
askpt merged 4 commits intoopen-feature:mainfrom
kylejuliandev:kylej/add-console-sample-app
Mar 27, 2026
Merged

docs: Add .NET 10 Console sample application#722
askpt merged 4 commits intoopen-feature:mainfrom
kylejuliandev:kylej/add-console-sample-app

Conversation

@kylejuliandev
Copy link
Copy Markdown
Contributor

This PR

Add simple Console sample application which utilises the InMemory provider and demonstrates how you can retrieve different types of Flag from a provider.

Related Issues

Notes

Follow-up Tasks

How to test

Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new .NET 10 Console sample application to the repository. This sample serves as a practical guide for developers, illustrating the integration and usage of the OpenFeature .NET SDK within a console environment. It specifically demonstrates how to configure and utilize the InMemoryProvider to evaluate various feature flag types, providing a clear example of how to retrieve and act upon different flag values.

Highlights

  • New Console Sample Application: A new .NET 10 Console sample application has been added to demonstrate OpenFeature SDK usage.
  • InMemory Provider Demonstration: The sample showcases how to configure and utilize the InMemoryProvider for feature flag management.
  • Diverse Flag Type Evaluation: It illustrates the evaluation of various flag types, including boolean, numeric, string, float, and object flags.
  • NativeAOT Compatibility: The sample is configured with NativeAOT, demonstrating the OpenFeature .NET SDK's compatibility with ahead-of-time compilation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new .NET console sample application to demonstrate the usage of OpenFeature with an in-memory provider. The changes are generally good, but I've found a few issues. There's a bug in the sample code where a feature flag is defined with one key but retrieved with another, causing it to always fall back to the default value. The documentation for the sample refers to .NET 10, which is a future version and could be confusing. The project file is also missing an explicit TargetFramework. Additionally, for consistency with other samples like AspNetCore, you might consider simplifying the directory structure from samples/Console/Samples.Console to samples/Console in a future PR.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.46%. Comparing base (8a0ed59) to head (ab2c981).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #722   +/-   ##
=======================================
  Coverage   93.46%   93.46%           
=======================================
  Files          68       68           
  Lines        2952     2952           
  Branches      350      350           
=======================================
  Hits         2759     2759           
  Misses        135      135           
  Partials       58       58           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
@kylejuliandev kylejuliandev marked this pull request as ready for review March 20, 2026 23:06
@kylejuliandev kylejuliandev requested a review from a team as a code owner March 20, 2026 23:06
Copy link
Copy Markdown
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

Seems like a good idea to me.

cc @askpt

Copy link
Copy Markdown
Member

@askpt askpt left a comment

Choose a reason for hiding this comment

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

LGTM! I wonder if we can convert into a single app file @kylejuliandev

@kylejuliandev
Copy link
Copy Markdown
Contributor Author

LGTM! I wonder if we can convert into a single app file @kylejuliandev

Happy to convert this sample to a single app file, or introduce a 3rd sample?

@askpt
Copy link
Copy Markdown
Member

askpt commented Mar 27, 2026

LGTM! I wonder if we can convert into a single app file @kylejuliandev

Happy to convert this sample to a single app file, or introduce a 3rd sample?

Just convert! Let's keep it simple 😄

Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
@askpt askpt added this pull request to the merge queue Mar 27, 2026
Merged via the queue into open-feature:main with commit d83a107 Mar 27, 2026
20 checks passed
@kylejuliandev kylejuliandev deleted the kylej/add-console-sample-app branch March 27, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants