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