Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Defaults vs custom values in attribute #6

@migig

Description

@migig

I don't understand how the default limits are used.

I always throttle specific actions, using the attribute. I don't do this globally. I want to define custom limits every time I use the attribute e.g. [EnableThrottling(PerFoo=123)].

But there are also defaults set in the global filter. I wish I didn't need to specify defaults, but the constructor wants them. Because of this my limits often conflict and I get unexpected results.

So is it safe to do something like this:

... new ThrottlingFilter( ...
    Policy = new ThrottlePolicy(perSecond:0, perMinute:0, perHour:0, perDay:0, perWeek:0) {
    ...

...and then set my real values on the attribute? I noticed that some of these override the others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions