source: binary-improvements2/WebServer/src/WebAPI/AbsWebAPI.cs@ 413

Last change on this file since 413 was 410, checked in by alloc, 21 months ago

Base API class improvements

File size: 455 bytes
Line 
1namespace Webserver.WebAPI {
2 public abstract class AbsWebAPI {
3 public readonly string Name;
4 protected readonly Web ParentWeb;
5
6 protected AbsWebAPI (string _name = null) : this(null, _name) {
7 }
8
9 protected AbsWebAPI (Web _parentWeb, string _name = null) {
10 Name = _name ?? GetType ().Name;
11 ParentWeb = _parentWeb;
12 }
13
14 public abstract void HandleRequest (RequestContext _context);
15
16 public virtual int DefaultPermissionLevel () => 0;
17 }
18}
Note: See TracBrowser for help on using the repository browser.