1 write to _collection
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (1)
46
_collection
= _http1Connection;
80 references to _collection
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (80)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (80)
64
foreach (var feature in
_collection
)
69
Assert.Same(
_collection
[type], feature.Value);
70
Assert.NotSame(
_collection
[type],
_collection
);
104
_collection
[typeof(IHttpRequestFeature)] = CreateHttp1Connection();
105
_collection
[typeof(IHttpRequestBodyDetectionFeature)] = CreateHttp1Connection();
106
_collection
[typeof(IHttpResponseFeature)] = CreateHttp1Connection();
107
_collection
[typeof(IHttpResponseBodyFeature)] = CreateHttp1Connection();
108
_collection
[typeof(IRequestBodyPipeFeature)] = CreateHttp1Connection();
109
_collection
[typeof(IHttpRequestIdentifierFeature)] = CreateHttp1Connection();
110
_collection
[typeof(IHttpRequestLifetimeFeature)] = CreateHttp1Connection();
111
_collection
[typeof(IHttpRequestTrailersFeature)] = CreateHttp1Connection();
112
_collection
[typeof(IHttpConnectionFeature)] = CreateHttp1Connection();
113
_collection
[typeof(IHttpMaxRequestBodySizeFeature)] = CreateHttp1Connection();
114
_collection
[typeof(IHttpMinRequestBodyDataRateFeature)] = CreateHttp1Connection();
115
_collection
[typeof(IHttpMinResponseDataRateFeature)] = CreateHttp1Connection();
116
_collection
[typeof(IHttpBodyControlFeature)] = CreateHttp1Connection();
117
_collection
[typeof(IRouteValuesFeature)] = CreateHttp1Connection();
118
_collection
[typeof(IEndpointFeature)] = CreateHttp1Connection();
119
_collection
[typeof(IHttpExtendedConnectFeature)] = CreateHttp1Connection();
120
_collection
[typeof(IHttpUpgradeFeature)] = CreateHttp1Connection();
121
_collection
[typeof(IPersistentStateFeature)] = CreateHttp1Connection();
123
_collection
.Set<IHttpWebTransportFeature>(CreateHttp1Connection());
134
_collection
.Set<IHttpRequestFeature>(CreateHttp1Connection());
135
_collection
.Set<IHttpRequestBodyDetectionFeature>(CreateHttp1Connection());
136
_collection
.Set<IHttpResponseFeature>(CreateHttp1Connection());
137
_collection
.Set<IHttpResponseBodyFeature>(CreateHttp1Connection());
138
_collection
.Set<IRequestBodyPipeFeature>(CreateHttp1Connection());
139
_collection
.Set<IHttpRequestIdentifierFeature>(CreateHttp1Connection());
140
_collection
.Set<IHttpRequestLifetimeFeature>(CreateHttp1Connection());
141
_collection
.Set<IHttpRequestTrailersFeature>(CreateHttp1Connection());
142
_collection
.Set<IHttpConnectionFeature>(CreateHttp1Connection());
143
_collection
.Set<IHttpMaxRequestBodySizeFeature>(CreateHttp1Connection());
144
_collection
.Set<IHttpMinRequestBodyDataRateFeature>(CreateHttp1Connection());
145
_collection
.Set<IHttpMinResponseDataRateFeature>(CreateHttp1Connection());
146
_collection
.Set<IHttpBodyControlFeature>(CreateHttp1Connection());
147
_collection
.Set<IRouteValuesFeature>(CreateHttp1Connection());
148
_collection
.Set<IEndpointFeature>(CreateHttp1Connection());
149
_collection
.Set<IHttpExtendedConnectFeature>(CreateHttp1Connection());
150
_collection
.Set<IHttpUpgradeFeature>(CreateHttp1Connection());
151
_collection
.Set<IPersistentStateFeature>(CreateHttp1Connection());
153
_collection
.Set<IHttpWebTransportFeature>(CreateHttp1Connection());
164
Assert.NotNull(
_collection
.Get<IHttpMinResponseDataRateFeature>());
170
_collection
[typeof(string)] = null;
171
Assert.Equal(0,
_collection
.Count(kv => kv.Key == typeof(string)));
173
_collection
[typeof(string)] = "A string";
174
Assert.Equal(1,
_collection
.Count(kv => kv.Key == typeof(string)));
176
_collection
[typeof(string)] = null;
177
Assert.Equal(0,
_collection
.Count(kv => kv.Key == typeof(string)));
182
Assert.Same(
_collection
.Get<IHttpRequestFeature>(),
_collection
[typeof(IHttpRequestFeature)]);
183
Assert.Same(
_collection
.Get<IHttpRequestBodyDetectionFeature>(),
_collection
[typeof(IHttpRequestBodyDetectionFeature)]);
184
Assert.Same(
_collection
.Get<IHttpResponseFeature>(),
_collection
[typeof(IHttpResponseFeature)]);
185
Assert.Same(
_collection
.Get<IHttpResponseBodyFeature>(),
_collection
[typeof(IHttpResponseBodyFeature)]);
186
Assert.Same(
_collection
.Get<IRequestBodyPipeFeature>(),
_collection
[typeof(IRequestBodyPipeFeature)]);
187
Assert.Same(
_collection
.Get<IHttpRequestIdentifierFeature>(),
_collection
[typeof(IHttpRequestIdentifierFeature)]);
188
Assert.Same(
_collection
.Get<IHttpRequestLifetimeFeature>(),
_collection
[typeof(IHttpRequestLifetimeFeature)]);
189
Assert.Same(
_collection
.Get<IHttpConnectionFeature>(),
_collection
[typeof(IHttpConnectionFeature)]);
190
Assert.Same(
_collection
.Get<IHttpMaxRequestBodySizeFeature>(),
_collection
[typeof(IHttpMaxRequestBodySizeFeature)]);
191
Assert.Same(
_collection
.Get<IHttpMinRequestBodyDataRateFeature>(),
_collection
[typeof(IHttpMinRequestBodyDataRateFeature)]);
192
Assert.Same(
_collection
.Get<IHttpMinResponseDataRateFeature>(),
_collection
[typeof(IHttpMinResponseDataRateFeature)]);
193
Assert.Same(
_collection
.Get<IHttpBodyControlFeature>(),
_collection
[typeof(IHttpBodyControlFeature)]);
199
foreach (var item in
_collection
)
204
var matches =
_collection
.Where(kv => ReferenceEquals(kv.Value, item.Value)).ToList();
226
foreach (var featureIter in
_collection
)
231
var featureLookup =
_collection
[type];
233
Assert.Same(featureLookup,
_collection
);
243
foreach (var feature in
_collection
)
248
_collection
[type] = CreateHttp1Connection();