-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusting "wait for disconnect" logic to accommodate for gracefully c…
…losing the connection.
- Loading branch information
Showing
7 changed files
with
78 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Benchmark.AspNetCore.ServerSentEvents/Infrastructure/NoOpHttpContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.Threading; | ||
using System.Security.Claims; | ||
using System.Collections.Generic; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Http.Features; | ||
|
||
namespace Benchmark.AspNetCore.ServerSentEvents.Infrastructure | ||
{ | ||
internal class NoOpHttpContext : HttpContext | ||
{ | ||
public override IFeatureCollection Features => throw new NotImplementedException(); | ||
|
||
public override HttpRequest Request => throw new NotImplementedException(); | ||
|
||
public override HttpResponse Response { get; } = new NoOpHttpResponse(); | ||
|
||
public override ConnectionInfo Connection => throw new NotImplementedException(); | ||
|
||
public override WebSocketManager WebSockets => throw new NotImplementedException(); | ||
|
||
public override ClaimsPrincipal User { get; set; } = new ClaimsPrincipal(); | ||
|
||
public override IDictionary<object, object> Items { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } | ||
|
||
public override IServiceProvider RequestServices { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } | ||
|
||
public override CancellationToken RequestAborted { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } | ||
|
||
public override string TraceIdentifier { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } | ||
|
||
public override ISession Session { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } | ||
|
||
public override void Abort() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters