Skip to content

Commit

Permalink
implementing methot app.MapWhen(context => { return context.Request.Q…
Browse files Browse the repository at this point in the history
…uery.ContainsKey("name"); }, testPipeline#);

in testPipeline
  • Loading branch information
fMATSINHE committed Jan 4, 2020
1 parent 0ba1f01 commit 42073eb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Helloword_core/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,32 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env )

private void testPipeline(IApplicationBuilder app)
{
app.MapWhen(context => { return context.Request.Query.ContainsKey("ln"); }, testPipeline1);
app.MapWhen(a => { return a.Request.Query.ContainsKey("in"); }, testPipeline2);

app.Run(async (context) =>
{
await context.Response.WriteAsync("hello from teste app.Map();");
});
}


private void testPipeline1(IApplicationBuilder app)
{

app.Run(async (context) =>
{
await context.Response.WriteAsync("hello from teste testPipeline1 kay ln;");
});
}

private void testPipeline2(IApplicationBuilder app)
{

app.Run(async (context) =>
{
await context.Response.WriteAsync("hello from teste testPipeline2 kay in;");
});
}
}
}

0 comments on commit 42073eb

Please sign in to comment.