static void Main(string[] args) { ProxySubject p = new ProxySubject(); p.Request(); Console.Read(); }
static void Main(string[] args) { ISubject subject = new ProxySubject(); subject.Request(); Console.ReadKey(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.Run(async(context) => { ProxySubject proxySubject = new ProxySubject(); string msg = proxySubject.Request(); await context.Response.WriteAsync(msg); }); }