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

Basic flag evaluation support #5

Merged
merged 4 commits into from
Jul 2, 2022

Conversation

benjiro
Copy link
Member

@benjiro benjiro commented Jun 26, 2022

Issue: #3

This PR implements the most basic form of the specification to allow retrival of string, number, boolean and structured flags.

Note this is a barebones start, IE I haven't Async'd anything yet

This isn't needed, everything will be contained in the one csproj for now

Signed-off-by: Benjamin Evenson <benjamin.evenson@loanmarketgroup.com>
Signed-off-by: Benjamin Evenson <benjamin.evenson@loanmarketgroup.com>
@toddbaert
Copy link
Member

I've seen this and plan on taking a close look in the next 2 days while I'm travelling! Thank you @benjiro

Copy link
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.

Looks good to me overall as a partial implementation!

Thanks so much for your contribution!

OpenFeature.sln Show resolved Hide resolved
src/OpenFeature/OpenFeature.cs Show resolved Hide resolved
Comment on lines 61 to 78
/*var allHooks = new List<IHook>()
.Concat(OpenFeature.GetHooks())
.Concat(_hooks)
.ToList();

var allHooksReversed = allHooks
.AsEnumerable()
.Reverse()
.ToList();

var hookContext = new HookContext<bool>(
flagKey,
defaultValue,
FlagValueType.Boolean,
_metadata,
OpenFeature.GetProviderMetadata(),
context
);*/
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this is commented on purpose, b/c you haven't implemented hooks, yet, but just commenting to make sure you didn't mean to remove it.

Copy link
Member Author

@benjiro benjiro Jul 1, 2022

Choose a reason for hiding this comment

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

Yea I got through implementing hooks and decided I should just get the basics done first. Ill rebase and remove this out for now

src/OpenFeature/OpenFeatureClient.cs Outdated Show resolved Hide resolved
src/OpenFeature/OpenFeatureClient.cs Outdated Show resolved Hide resolved
Implement the most basic version of the specification.

Signed-off-by: Benjamin Evenson <benjamin.evenson@loanmarketgroup.com>
Signed-off-by: Benjamin Evenson <benjamin.evenson@loanmarketgroup.com>
@benjiro benjiro force-pushed the feat/basic-flag-evluation branch from c48a782 to 9f1d990 Compare July 1, 2022 11:11
@benjiro
Copy link
Member Author

benjiro commented Jul 2, 2022

I'm going to move this PR forwards, so I can open the PR for hooks + context

@benjiro benjiro merged commit 6847b85 into open-feature:main Jul 2, 2022
@benjiro benjiro mentioned this pull request Jul 2, 2022
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