Beispiel #1
0
    public ActionResult Index()
    {
        var lib = new MyLib.MyClass();
        var msg = lib.GetUserAgent(System.Web.HttpContext.Current);

        lib.WriteToResponse(System.Web.HttpContext.Current, "user agent is: " + msg);
        return(new HttpStatusCodeResult(200));
    }
Beispiel #2
0
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(IApplicationBuilder app, IHostingEnvironment env)
 {
     app.Use(async(ctx, next) => {
         var lib = new MyLib.MyClass();
         var msg = lib.GetUserAgent(ctx);
         lib.WriteToResponse(ctx, "user agent is: " + msg);
     });
 }