Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
BytesExceeded.cs
1using System.Threading.Tasks;
2using System.Xml;
4
6{
11 {
16 : base()
17 {
18 }
19
27 : base(Xml, Parent, Document)
28 {
29 }
30
34 public override string LocalName => nameof(BytesExceeded);
35
43 public override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document) => new BytesExceeded(Xml, Parent, Document);
44
50 public override Task<WafResult?> Review(ProcessingState State)
51 {
52 long Size;
53
54 if (State.Request.HasData)
55 {
56 Size = State.Request.DataStream.Length;
57 return this.ReviewIncrement(State, Size);
58 }
59 else
60 return Task.FromResult<WafResult?>(null);
61 }
62 }
63}
Checks if the remote endpoint has sent too much bytes.
override Task< WafResult?> Review(ProcessingState State)
Reviews the processing state, and returns a WAF result, if any.
BytesExceeded(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Checks if the remote endpoint has sent too much bytes.
override string LocalName
XML Local Name for the XML element defining the action.
BytesExceeded()
Checks if the remote endpoint has sent too much bytes.
override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Creates a WAF action from its XML definition.
Abstract base class for rate limit comparisons.
async Task< WafResult?> ReviewIncrement(ProcessingState State, long Delta)
Reviews the processing state, and returns a WAF result, if any.
Contains the current state of a review process.
HttpRequest Request
Current HTTP Request
Abstract base class for Web Application Firewall actions.
Definition: WafAction.cs:17
WebApplicationFirewall Document
Web Application Firewall document.
Definition: WafAction.cs:60
Web Application Firewall for HttpServer.
WafResult
Actions that a Web Server can take after reviewing a request.