Replies: 1 comment 3 replies
-
Hey @apatenge, the spec currently defines that flag metadata values can be type FYI @open-feature/technical-steering-committee |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi OpenFeature .NET team,
to use metadata to provide for example an expiry date for the flag could be a common use case.
Therefore it would be great to add an getter for DateTime data type to the FlagMetadata class.
Alternative the GetValue method could be made public to get any data type easily.
Maybe both way would be also an option.
I have changed and tested successfully the following locally on my system based on lib v1.6.0:
In BaseMetadata.cs
I have added:
And I have changed:
to
In order to use an official release of open feature lib I am currently using an uncomfortable workaround in my provider, where I am replacing all DateTime objects in metadata by strings before I return it to the feature client. Then I can get it as string. A direct access to the date time would be much cleaner and convenient.
I hope this is a helpful change. I am looking forward to find this in one of the next release (maybe already in v1.6.1 ;)
Many thanks.
Regards,
André
Beta Was this translation helpful? Give feedback.
All reactions