Skip to content

Example app for paramters object#598

Open
linglingye001 wants to merge 2 commits into
mainfrom
linglingye/example-app-parameters-object
Open

Example app for paramters object#598
linglingye001 wants to merge 2 commits into
mainfrom
linglingye/example-app-parameters-object

Conversation

@linglingye001
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new console sample that demonstrates using FeatureFilterConfiguration.ParametersObject to supply strongly-typed filter settings directly from a custom IFeatureDefinitionProvider, avoiding IConfiguration-based parameter binding.

Changes:

  • Introduces ParameterObjectConsoleApp example project with a top-level Program.cs that evaluates a targeting-based feature for multiple users.
  • Adds an InMemoryFeatureDefinitionProvider that returns a FeatureDefinition whose filter settings are provided via ParametersObject.
  • Documents the concept and usage in a new sample README.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
examples/ParameterObjectConsoleApp/README.md Documents the new ParametersObject-based sample and how to run it.
examples/ParameterObjectConsoleApp/Program.cs Implements the sample’s runtime evaluation loop using ContextualTargetingFilter.
examples/ParameterObjectConsoleApp/ParameterObjectConsoleApp.csproj Defines the new .NET 8 console app project and references the main library.
examples/ParameterObjectConsoleApp/InMemoryFeatureDefinitionProvider.cs Provides in-memory feature definitions using ParametersObject for targeting settings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +72 to +73

await Task.CompletedTask;
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

GetAllFeatureDefinitionsAsync is implemented as an async iterator but only awaits Task.CompletedTask at the end, which is redundant and adds noise. Consider removing the trailing await (and/or dropping async if you switch to a non-async implementation) so the method is a straightforward async iterator.

Suggested change
await Task.CompletedTask;

Copilot uses AI. Check for mistakes.
Comment thread examples/ParameterObjectConsoleApp/InMemoryFeatureDefinitionProvider.cs Outdated
Comment thread examples/ParameterObjectConsoleApp/README.md Outdated
Comment thread examples/ParameterObjectConsoleApp/ParameterObjectConsoleApp.csproj Outdated
@linglingye001 linglingye001 force-pushed the linglingye/example-app-parameters-object branch from 31f525f to 537ccaa Compare May 11, 2026 08:34
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.

2 participants