Esempio n. 1
0
 protected override void InitActionListImpl(CgiActionList noAuth, CgiActionList reqAuth)
 {
     try
     {
         noAuth.AddAction("/", WebMethodBits.GET | WebMethodBits.HEAD, async(ctx) =>
         {
             await Task.CompletedTask;
             var method = ctx.QueryString._GetStrFirst("method")._ParseEnum(SnmpWorkGetMethod.Get);
             return(new HttpStringResult(Host.GetSnmpBody(method, ctx.QueryString._GetStrFirst("oid"), ctx.QueryString._GetStrFirst("retnone")._ToBool())._NormalizeCrlf(CrlfStyle.Lf, true)));
         });
     }
     catch
     {
         this._DisposeSafe();
         throw;
     }
 }
Esempio n. 2
0
 protected abstract void InitActionListImpl(CgiActionList noAuth, CgiActionList reqAuth);