1 write to State
Microsoft.AspNetCore.Routing (1)
Matching\PolicyNodeEdge.cs (1)
20
State
= state ?? throw new System.ArgumentNullException(nameof(state));
63 references to State
Microsoft.AspNetCore.Routing (3)
Matching\DfaMatcherBuilder.cs (2)
929
Label = (parent.Label != null) ? parent.Label + " " + edge.
State
.ToString() : null,
938
parent.AddPolicyEdge(edge.
State
, next);
Matching\PolicyNodeEdge.cs (1)
25
/// Gets the endpoints that match the policy defined by <see cref="
State
"/>.
Microsoft.AspNetCore.Routing.Tests (60)
Matching\AcceptsMatcherPolicyTest.cs (16)
178
edges.OrderBy(e => e.
State
),
181
Assert.Equal(string.Empty, e.
State
);
186
Assert.Equal("*/*", e.
State
);
191
Assert.Equal("application/*", e.
State
);
196
Assert.Equal("application/*+json", e.
State
);
201
Assert.Equal("application/*+xml", e.
State
);
206
Assert.Equal("application/json", e.
State
);
211
Assert.Equal("application/xml", e.
State
);
236
edges.OrderBy(e => e.
State
),
239
Assert.Equal(string.Empty, e.
State
);
244
Assert.Equal("*/*", e.
State
);
249
Assert.Equal("application/*", e.
State
);
254
Assert.Equal("application/*+json", e.
State
);
259
Assert.Equal("application/*+xml", e.
State
);
264
Assert.Equal("application/json", e.
State
);
269
Assert.Equal("application/xml", e.
State
);
Matching\ContentEncodingNegotiationMatcherPolicyTest.cs (9)
361
e => Assert.Equal("gzip", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.
State
).NegotiationValue),
362
e => Assert.Equal("br", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.
State
).NegotiationValue),
365
Assert.Equal("identity", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.
State
).NegotiationValue);
371
Assert.Equal("", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.
State
).NegotiationValue);
396
Assert.Equal("gzip", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.
State
).NegotiationValue);
403
Assert.Equal("br", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.
State
).NegotiationValue);
410
Assert.Equal("identity", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.
State
).NegotiationValue);
416
Assert.Equal("", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.
State
).NegotiationValue);
625
var table = policy.BuildJumpTable(-100, edges.Select((e, i) => new PolicyJumpTableEdge(e.
State
, i + 1)).ToArray());
Matching\HostMatcherPolicyTest.cs (8)
216
var data = edges.OrderBy(e => e.
State
).ToList();
223
Assert.Equal("*:*", e.
State
.ToString());
228
Assert.Equal("*:5000", e.
State
.ToString());
233
Assert.Equal("*:5001", e.
State
.ToString());
238
Assert.Equal("*.contoso.com:*", e.
State
.ToString());
243
Assert.Equal("*.sub.contoso.com:*", e.
State
.ToString());
248
Assert.Equal("www.contoso.com:*", e.
State
.ToString());
253
Assert.Equal("www.contoso.com:5000", e.
State
.ToString());
Matching\HttpMethodMatcherPolicyTest.cs (27)
198
edges.OrderBy(e => e.
State
),
201
Assert.Equal(new EdgeKey(AnyMethod, isCorsPreflightRequest: false), e.
State
);
206
Assert.Equal(new EdgeKey("GET", isCorsPreflightRequest: false), e.
State
);
211
Assert.Equal(new EdgeKey("POST", isCorsPreflightRequest: false), e.
State
);
216
Assert.Equal(new EdgeKey("PUT", isCorsPreflightRequest: false), e.
State
);
243
edges.OrderBy(e => e.
State
),
246
Assert.Equal(new EdgeKey(AnyMethod, isCorsPreflightRequest: false), e.
State
);
251
Assert.Equal(new EdgeKey(AnyMethod, isCorsPreflightRequest: true), e.
State
);
256
Assert.Equal(new EdgeKey("GET", isCorsPreflightRequest: false), e.
State
);
261
Assert.Equal(new EdgeKey("GET", isCorsPreflightRequest: true), e.
State
);
266
Assert.Equal(new EdgeKey("POST", isCorsPreflightRequest: false), e.
State
);
271
Assert.Equal(new EdgeKey("POST", isCorsPreflightRequest: true), e.
State
);
276
Assert.Equal(new EdgeKey("PUT", isCorsPreflightRequest: false), e.
State
);
281
Assert.Equal(new EdgeKey("PUT", isCorsPreflightRequest: true), e.
State
);
306
edges.OrderBy(e => e.
State
),
309
Assert.Equal(new EdgeKey(AnyMethod, isCorsPreflightRequest: false), e.
State
);
314
Assert.Equal(new EdgeKey("GET", isCorsPreflightRequest: false), e.
State
);
319
Assert.Equal(new EdgeKey("POST", isCorsPreflightRequest: false), e.
State
);
324
Assert.Equal(new EdgeKey("PUT", isCorsPreflightRequest: false), e.
State
);
350
edges.OrderBy(e => e.
State
),
353
Assert.Equal(new EdgeKey(AnyMethod, isCorsPreflightRequest: false), e.
State
);
358
Assert.Equal(new EdgeKey("GET", isCorsPreflightRequest: false), e.
State
);
363
Assert.Equal(new EdgeKey("GET", isCorsPreflightRequest: true), e.
State
);
368
Assert.Equal(new EdgeKey("POST", isCorsPreflightRequest: false), e.
State
);
373
Assert.Equal(new EdgeKey("POST", isCorsPreflightRequest: true), e.
State
);
378
Assert.Equal(new EdgeKey("PUT", isCorsPreflightRequest: false), e.
State
);
383
Assert.Equal(new EdgeKey("PUT", isCorsPreflightRequest: true), e.
State
);