コード例 #1
0
        public static void Pusher(this HttpRequest @this, IHttp2Pusher pusher)
        {
            if (@this == null)
            {
                throw new ArgumentNullException(nameof(@this));
            }

            @this.Properties[_Pusher] = pusher;
        }
コード例 #2
0
 public string Test2(Object1 o1, Object2 o2, IHttp2Pusher pusher, AsyncObject o3, GenericObject <string> o4)
 {
     Console.WriteLine($"Object1:{o1}");
     Console.WriteLine($"Object2:{o2}");
     Console.WriteLine($"IHttp2Pusher:{pusher}");
     Console.WriteLine($"AsyncObject:{o3}");
     Console.WriteLine($"GenericObject<string>:{o4}");
     return("String");
 }
コード例 #3
0
        public View Login(Passport passport, IHttp2Pusher pusher)
        {
            if (passport != null)
            {
                return(View("/Book/Books"));
            }

            if (pusher != null)
            {
                //only for Test(StaticFile don't use push)
                var jqResp = new HttpResponse();                         //not use Request.CreateResponse();
                jqResp.UseFile("StaticFiles/Js/jQuery-3.3.1/jquery.js"); //push not Minify
                pusher.Push("/Js/jQuery-3.3.1/jquery.min.js", jqResp);
            }
            return(View("/Login"));
        }