Ignore:
Timestamp:
Feb 22, 2023, 5:54:14 PM (21 months ago)
Author:
alloc
Message:

Base API class improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/WebServer/src/WebAPI/AbsWebAPI.cs

    r391 r410  
    22        public abstract class AbsWebAPI {
    33                public readonly string Name;
     4                protected readonly Web ParentWeb;
    45
    5                 protected AbsWebAPI (string _name = null) {
     6                protected AbsWebAPI (string _name = null) : this(null, _name) {
     7                }
     8
     9                protected AbsWebAPI (Web _parentWeb, string _name = null) {
    610                        Name = _name ?? GetType ().Name;
     11                        ParentWeb = _parentWeb;
    712                }
    813
    914                public abstract void HandleRequest (RequestContext _context);
    1015
    11                 public virtual int DefaultPermissionLevel () {
    12                         return 0;
    13                 }
     16                public virtual int DefaultPermissionLevel () => 0;
    1417        }
    1518}
Note: See TracChangeset for help on using the changeset viewer.