@@ -31,11 +31,15 @@ public async Task ReceivedFramesAreWrittenToChannel(string webSocketMessageType)
31
31
using ( StartVerifiableLog ( ) )
32
32
{
33
33
var pair = DuplexPipe . CreateConnectionPair ( PipeOptions . Default , PipeOptions . Default ) ;
34
- var connection = new HttpConnectionContext ( "foo" , pair . Transport , pair . Application , LoggerFactory . CreateLogger ( "HttpConnectionContext1" ) ) ;
34
+ var connection = new HttpConnectionContext ( "foo" , connectionToken : null , LoggerFactory . CreateLogger ( "HttpConnectionContext1" ) )
35
+ {
36
+ Transport = pair . Transport ,
37
+ Application = pair . Application ,
38
+ } ;
35
39
36
40
using ( var feature = new TestWebSocketConnectionFeature ( ) )
37
41
{
38
- var connectionContext = new HttpConnectionContext ( string . Empty , null , null , LoggerFactory . CreateLogger ( "HttpConnectionContext2" ) ) ;
42
+ var connectionContext = new HttpConnectionContext ( string . Empty , connectionToken : null , LoggerFactory . CreateLogger ( "HttpConnectionContext2" ) ) ;
39
43
var ws = new WebSocketsServerTransport ( new WebSocketOptions ( ) , connection . Application , connectionContext , LoggerFactory ) ;
40
44
41
45
// Give the server socket to the transport and run it
@@ -79,11 +83,15 @@ public async Task WebSocketTransportSetsMessageTypeBasedOnTransferFormatFeature(
79
83
using ( StartVerifiableLog ( ) )
80
84
{
81
85
var pair = DuplexPipe . CreateConnectionPair ( PipeOptions . Default , PipeOptions . Default ) ;
82
- var connection = new HttpConnectionContext ( "foo" , pair . Transport , pair . Application , LoggerFactory . CreateLogger ( "HttpConnectionContext1" ) ) ;
86
+ var connection = new HttpConnectionContext ( "foo" , connectionToken : null , LoggerFactory . CreateLogger ( "HttpConnectionContext1" ) )
87
+ {
88
+ Transport = pair . Transport ,
89
+ Application = pair . Application ,
90
+ } ;
83
91
84
92
using ( var feature = new TestWebSocketConnectionFeature ( ) )
85
93
{
86
- var connectionContext = new HttpConnectionContext ( string . Empty , null , null , LoggerFactory . CreateLogger ( "HttpConnectionContext2" ) ) ;
94
+ var connectionContext = new HttpConnectionContext ( string . Empty , connectionToken : null , LoggerFactory . CreateLogger ( "HttpConnectionContext2" ) ) ;
87
95
connectionContext . ActiveFormat = transferFormat ;
88
96
var ws = new WebSocketsServerTransport ( new WebSocketOptions ( ) , connection . Application , connectionContext , LoggerFactory ) ;
89
97
@@ -116,7 +124,11 @@ public async Task TransportCommunicatesErrorToApplicationWhenClientDisconnectsAb
116
124
using ( StartVerifiableLog ( ) )
117
125
{
118
126
var pair = DuplexPipe . CreateConnectionPair ( PipeOptions . Default , PipeOptions . Default ) ;
119
- var connection = new HttpConnectionContext ( "foo" , pair . Transport , pair . Application , LoggerFactory . CreateLogger ( "HttpConnectionContext1" ) ) ;
127
+ var connection = new HttpConnectionContext ( "foo" , connectionToken : null , LoggerFactory . CreateLogger ( "HttpConnectionContext1" ) )
128
+ {
129
+ Transport = pair . Transport ,
130
+ Application = pair . Application ,
131
+ } ;
120
132
121
133
using ( var feature = new TestWebSocketConnectionFeature ( ) )
122
134
{
@@ -139,7 +151,7 @@ async Task CompleteApplicationAfterTransportCompletes()
139
151
}
140
152
}
141
153
142
- var connectionContext = new HttpConnectionContext ( string . Empty , null , null , LoggerFactory . CreateLogger ( "HttpConnectionContext2" ) ) ;
154
+ var connectionContext = new HttpConnectionContext ( string . Empty , connectionToken : null , LoggerFactory . CreateLogger ( "HttpConnectionContext2" ) ) ;
143
155
var ws = new WebSocketsServerTransport ( new WebSocketOptions ( ) , connection . Application , connectionContext , LoggerFactory ) ;
144
156
145
157
// Give the server socket to the transport and run it
@@ -169,7 +181,11 @@ public async Task ClientReceivesInternalServerErrorWhenTheApplicationFails()
169
181
using ( StartVerifiableLog ( ) )
170
182
{
171
183
var pair = DuplexPipe . CreateConnectionPair ( PipeOptions . Default , PipeOptions . Default ) ;
172
- var connection = new HttpConnectionContext ( "foo" , pair . Transport , pair . Application ) ;
184
+ var connection = new HttpConnectionContext ( "foo" , connectionToken : null , LoggerFactory . CreateLogger ( nameof ( HttpConnectionContext ) ) )
185
+ {
186
+ Transport = pair . Transport ,
187
+ Application = pair . Application ,
188
+ } ;
173
189
174
190
using ( var feature = new TestWebSocketConnectionFeature ( ) )
175
191
{
@@ -201,7 +217,11 @@ public async Task TransportClosesOnCloseTimeoutIfClientDoesNotSendCloseFrame()
201
217
using ( StartVerifiableLog ( ) )
202
218
{
203
219
var pair = DuplexPipe . CreateConnectionPair ( PipeOptions . Default , PipeOptions . Default ) ;
204
- var connection = new HttpConnectionContext ( "foo" , pair . Transport , pair . Application ) ;
220
+ var connection = new HttpConnectionContext ( "foo" , connectionToken : null , LoggerFactory . CreateLogger ( nameof ( HttpConnectionContext ) ) )
221
+ {
222
+ Transport = pair . Transport ,
223
+ Application = pair . Application ,
224
+ } ;
205
225
206
226
using ( var feature = new TestWebSocketConnectionFeature ( ) )
207
227
{
@@ -236,7 +256,11 @@ public async Task TransportFailsOnTimeoutWithErrorWhenApplicationFailsAndClientD
236
256
using ( StartVerifiableLog ( ) )
237
257
{
238
258
var pair = DuplexPipe . CreateConnectionPair ( PipeOptions . Default , PipeOptions . Default ) ;
239
- var connection = new HttpConnectionContext ( "foo" , pair . Transport , pair . Application ) ;
259
+ var connection = new HttpConnectionContext ( "foo" , connectionToken : null , LoggerFactory . CreateLogger ( nameof ( HttpConnectionContext ) ) )
260
+ {
261
+ Transport = pair . Transport ,
262
+ Application = pair . Application ,
263
+ } ;
240
264
241
265
using ( var feature = new TestWebSocketConnectionFeature ( ) )
242
266
{
@@ -271,7 +295,11 @@ public async Task ServerGracefullyClosesWhenApplicationEndsThenClientSendsCloseF
271
295
using ( StartVerifiableLog ( ) )
272
296
{
273
297
var pair = DuplexPipe . CreateConnectionPair ( PipeOptions . Default , PipeOptions . Default ) ;
274
- var connection = new HttpConnectionContext ( "foo" , pair . Transport , pair . Application ) ;
298
+ var connection = new HttpConnectionContext ( "foo" , connectionToken : null , LoggerFactory . CreateLogger ( nameof ( HttpConnectionContext ) ) )
299
+ {
300
+ Transport = pair . Transport ,
301
+ Application = pair . Application ,
302
+ } ;
275
303
276
304
using ( var feature = new TestWebSocketConnectionFeature ( ) )
277
305
{
@@ -311,7 +339,11 @@ public async Task ServerGracefullyClosesWhenClientSendsCloseFrameThenApplication
311
339
using ( StartVerifiableLog ( ) )
312
340
{
313
341
var pair = DuplexPipe . CreateConnectionPair ( PipeOptions . Default , PipeOptions . Default ) ;
314
- var connection = new HttpConnectionContext ( "foo" , pair . Transport , pair . Application ) ;
342
+ var connection = new HttpConnectionContext ( "foo" , connectionToken : null , LoggerFactory . CreateLogger ( nameof ( HttpConnectionContext ) ) )
343
+ {
344
+ Transport = pair . Transport ,
345
+ Application = pair . Application ,
346
+ } ;
315
347
316
348
using ( var feature = new TestWebSocketConnectionFeature ( ) )
317
349
{
@@ -354,7 +386,11 @@ public async Task SubProtocolSelectorIsUsedToSelectSubProtocol()
354
386
using ( StartVerifiableLog ( ) )
355
387
{
356
388
var pair = DuplexPipe . CreateConnectionPair ( PipeOptions . Default , PipeOptions . Default ) ;
357
- var connection = new HttpConnectionContext ( "foo" , pair . Transport , pair . Application ) ;
389
+ var connection = new HttpConnectionContext ( "foo" , connectionToken : null , LoggerFactory . CreateLogger ( nameof ( HttpConnectionContext ) ) )
390
+ {
391
+ Transport = pair . Transport ,
392
+ Application = pair . Application ,
393
+ } ;
358
394
359
395
using ( var feature = new TestWebSocketConnectionFeature ( ) )
360
396
{
0 commit comments