Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

GlobalRates are not serialised due to the Rates property being interal #81

Open
dendle opened this issue Dec 2, 2016 · 0 comments
Open

Comments

@dendle
Copy link

dendle commented Dec 2, 2016

Hello Stefan,

Thanks for a great tool, and thanks for making it public.

I would like to have a default rate limit for clients with no pre-defined rules.

This is normally achievable by specifying the global rules in the constructor on ThrottlePolicy.

However, when I use an implementation of IPolicyRepositoryfor this, in which I serialise the object, these global settings (Stored in the internal property Rates) are not serialised, and are of course lost when the policy is re-loaded from the repository.

The immediate fix that springs to mind is to make the Rates property public, but I'm not sure what the intention was to make it internal.

Perhaps I am missing something - can anyone help?

Cheers,
Matt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant