1 write to Name
Microsoft.AspNetCore.Routing (1)
Patterns\RoutePatternParameterPart.cs (1)
39
Name
= parameterName;
156 references to Name
Microsoft.AspNetCore.App.Analyzers.Test (3)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (3)
207
if (tree.TryGetRouteParameter(parsedRoutePattern.
Name
, out var routeParameter))
223
throw new Exception($"Couldn't find parameter '{parsedRoutePattern.
Name
}'.");
228
throw new Exception($"Parsing '{token.ValueText}' has route parameter '{parsedRoutePattern.
Name
}' mismatch.", ex);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
JsonTranscodingServiceMethodProviderTests.cs (1)
33
Assert.Equal("name", endpoint.RoutePattern.Parameters[0].
Name
);
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
EndpointMetadataApiDescriptionProvider.cs (3)
204
var name = pattern.GetParameter(parameterName)?.
Name
?? parameterName;
258
var name = pattern.GetParameter(parameterName)?.
Name
?? parameterName;
296
return (BindingSource.Path, routeParam.
Name
, false, displayType);
Microsoft.AspNetCore.Mvc.Core (2)
Routing\ActionEndpointFactory.cs (1)
316
resolvedRequiredValues.Remove(parameter.
Name
);
Routing\RoutePatternWriter.cs (1)
45
sb.Append(parameterPart.
Name
);
Microsoft.AspNetCore.OpenApi (2)
Extensions\ApiDescriptionExtensions.cs (1)
65
strippedRoute.Append(parameterPart.
Name
);
Services\OpenApiGenerator.cs (1)
385
var name = attributeName ?? (pattern.GetParameter(parameter.Name) is { } routeParameter ? routeParameter.
Name
: parameter.Name);
Microsoft.AspNetCore.Routing (48)
Matching\DfaMatcherBuilder.cs (14)
325
if (endpoint.RoutePattern.ParameterPolicies.TryGetValue(parameterPart.
Name
, out var parameterPolicyReferences))
392
if (!routeValues.TryGetValue(partParameter.
Name
, out var parameterValue))
400
if (endpoint.RoutePattern.ParameterPolicies.TryGetValue(partParameter.
Name
, out var parameterPolicyReferences))
406
if (parameterPolicy is IParameterLiteralNodeMatchingPolicy constraint && !constraint.MatchesLiteral(partParameter.
Name
, (string)parameterValue))
443
if (!hasFailingPolicy[literalIndex] && !constraint.MatchesLiteral(parameterPart.
Name
, literal))
475
if (endpoint.RoutePattern.ParameterPolicies.TryGetValue(parameterPart.
Name
, out var parameterPolicyReferences))
489
var literalValue = requiredValue?.ToString() ?? throw new InvalidOperationException($"Required value for literal '{parameterPart.
Name
}' must evaluate to a non-null string.");
767
if (!_assignments.TryGetValue(parameterPart.
Name
, out var slotIndex))
770
_assignments.Add(parameterPart.
Name
, slotIndex);
776
_slots.Add(new KeyValuePair<string, object>(parameterPart.
Name
, requiredValue));
781
_slots.Add(hasDefaultValue ? new KeyValuePair<string, object>(parameterPart.
Name
, parameterPart.Default) : default);
792
catchAll = (parameterPart.
Name
, i, slotIndex);
796
_captures.Add((parameterPart.
Name
, i, slotIndex));
982
if (!routePattern.RequiredValues.TryGetValue(parameterPart.
Name
, out value))
Patterns\DefaultRoutePatternTransformer.cs (1)
228
var updatedParameter = RoutePatternFactory.ParameterPart(parameter.
Name
, @default: null, parameter.ParameterKind, parameter.ParameterPolicies);
Patterns\RoutePattern.cs (1)
148
if (string.Equals(parameter.
Name
, name, StringComparison.OrdinalIgnoreCase))
Patterns\RoutePatternFactory.cs (9)
506
if (string.Equals(kvp.Key, parameters[i].
Name
, StringComparison.OrdinalIgnoreCase))
581
if (updatedDefaults != null && updatedDefaults.TryGetValue(parameter.
Name
, out var newDefault))
585
var message = Resources.FormatTemplateRoute_CannotHaveDefaultValueSpecifiedInlineAndExplicitly(parameter.
Name
);
605
updatedDefaults[parameter.
Name
] = parameter.Default;
609
if ((parameterPolicyReferences == null || !parameterPolicyReferences.TryGetValue(parameter.
Name
, out parameterConstraints)) &&
618
parameterPolicyReferences.Add(parameter.
Name
, parameterConstraints);
635
parameter.
Name
,
1076
if (!parameterNameSet.Add(parameterPart.
Name
))
1078
var errorText = Resources.FormatTemplateRoute_RepeatedParameter(parameterPart.
Name
);
Patterns\RoutePatternMatcher.cs (8)
51
if (Defaults.TryGetValue(parameter.
Name
, out var value))
179
if (defaultValue != null || !values.ContainsKey(parameter.
Name
))
181
values[parameter.
Name
] = defaultValue;
255
values[parameter.
Name
] = captured;
260
values[parameter.
Name
] = _defaultValues[index];
273
values[parameter.
Name
] = requestSegment.ToString();
279
values[parameter.
Name
] = _defaultValues[index];
474
outValues.Add(parameterNeedsValue.
Name
, new string(parameterValueSpan));
Patterns\RoutePatternParameterPart.cs (1)
97
builder.Append(
Name
);
Patterns\RoutePatternParser.cs (4)
233
var parameterName = templatePart.
Name
;
372
parameter.
Name
,
385
parameter.
Name
,
401
parameter.
Name
,
RouteEndpointDataSource.cs (1)
287
yield return routePatternPart.
Name
;
Template\RoutePrecedence.cs (1)
266
if (routePattern.RequiredValues.TryGetValue(parameterPart.
Name
, out var requiredValue) &&
Template\TemplateBinder.cs (7)
86
filters.Remove(pattern.Parameters[i].
Name
);
118
filters.Remove(pattern.Parameters[i].
Name
);
282
_defaults?.ContainsKey(parameter.
Name
) != true)
339
else if (_defaults != null && _defaults.TryGetValue(parameter.
Name
, out var defaultValue))
544
acceptedValues.Remove(parameterPart.
Name
, out var value);
548
_defaults.TryGetValue(parameterPart.
Name
, out var defaultValue) &&
726
slots[i] = new KeyValuePair<string, object?>(pattern.Parameters[i].
Name
, null);
Template\TemplatePart.cs (1)
40
Name = parameter.
Name
;
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
58
defaults.Remove(parameter.
Name
);
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
62
defaults.Remove(parameter.
Name
);
Microsoft.AspNetCore.Routing.Tests (95)
Matching\RouteMatcherBuilder.cs (1)
58
defaults.Remove(parameter.
Name
);
Matching\TreeRouterMatcherBuilder.cs (1)
62
defaults.Remove(parameter.
Name
);
Patterns\InlineRouteParameterParserTest.cs (75)
17
Assert.Equal(parameterName, templatePart.
Name
);
29
Assert.Equal("param", templatePart.
Name
);
41
Assert.Equal("param", templatePart.
Name
);
53
Assert.Equal("param", templatePart.
Name
);
65
Assert.Equal("param", templatePart.
Name
);
77
Assert.Equal("param", templatePart.
Name
);
91
Assert.Equal("param", templatePart.
Name
);
105
Assert.Equal("param", templatePart.
Name
);
119
Assert.Equal("param", templatePart.
Name
);
134
Assert.Equal("param", templatePart.
Name
);
149
Assert.Equal("param", templatePart.
Name
);
163
Assert.Equal("param", templatePart.
Name
);
179
Assert.Equal("param", templatePart.
Name
);
193
Assert.Equal("param", templatePart.
Name
);
208
Assert.Equal("param", templatePart.
Name
);
222
Assert.Equal("param", templatePart.
Name
);
238
Assert.Equal("param", templatePart.
Name
);
258
Assert.Equal("comparison-operator", templatePart.
Name
);
275
Assert.Equal("p1", param1.
Name
);
285
Assert.Equal("p2", param2.
Name
);
290
Assert.Equal("p3", param3.
Name
);
301
Assert.Equal("world", templatePart.
Name
);
311
Assert.Equal("param", templatePart.
Name
);
322
Assert.Equal("param", templatePart.
Name
);
335
Assert.Equal("param", templatePart.
Name
);
350
Assert.Equal("param", templatePart.
Name
);
363
Assert.Equal("param", templatePart.
Name
);
378
Assert.Equal("param", templatePart.
Name
);
391
Assert.Equal("param", templatePart.
Name
);
406
Assert.Equal("param", templatePart.
Name
);
419
Assert.Equal(":param", templatePart.
Name
);
434
Assert.Equal(":param", templatePart.
Name
);
450
Assert.Equal(":param", templatePart.
Name
);
464
Assert.Equal("param", templatePart.
Name
);
477
Assert.Equal("par,am", templatePart.
Name
);
490
Assert.Equal("param", templatePart.
Name
);
505
Assert.Equal("param", templatePart.
Name
);
521
Assert.Equal("param", templatePart.
Name
);
535
Assert.Equal("param", templatePart.
Name
);
546
Assert.Equal("param", templatePart.
Name
);
560
Assert.Equal("param", templatePart.
Name
);
574
Assert.Equal("par", templatePart.
Name
);
585
Assert.Equal("param", templatePart.
Name
);
596
Assert.Equal("par", templatePart.
Name
);
607
Assert.Equal("par", templatePart.
Name
);
618
Assert.Equal("param", templatePart.
Name
);
632
Assert.Equal("param", templatePart.
Name
);
645
Assert.Equal("par{am", templatePart.
Name
);
658
Assert.Equal("param", templatePart.
Name
);
673
Assert.Equal("par(am", templatePart.
Name
);
686
Assert.Equal("param", templatePart.
Name
);
699
Assert.Equal("param", templatePart.
Name
);
712
Assert.Equal("param", templatePart.
Name
);
726
Assert.Equal("param", templatePart.
Name
);
742
Assert.Equal("param", templatePart.
Name
);
756
Assert.Equal("param", templatePart.
Name
);
771
Assert.Equal("param", templatePart.
Name
);
786
Assert.Equal("param", templatePart.
Name
);
801
Assert.Equal("param", templatePart.
Name
);
816
Assert.Equal("param", templatePart.
Name
);
831
Assert.Equal("par?am", templatePart.
Name
);
846
Assert.Equal("param", templatePart.
Name
);
862
Assert.Equal("param", templatePart.
Name
);
877
Assert.Equal("foo", templatePart.
Name
);
892
Assert.Equal("p1", templatePart.
Name
);
907
Assert.Equal("p1", templatePart.
Name
);
932
Assert.Equal(expectedParameterName, templatePart.
Name
);
944
Assert.Equal("path", parameterPart.
Name
);
957
Assert.Equal("path", parameterPart.
Name
);
975
Assert.Equal("path", parameterPart.
Name
);
993
Assert.Equal("path", parameterPart.
Name
);
1010
Assert.Equal("path", parameterPart.
Name
);
1022
Assert.Equal("path", parameterPart.
Name
);
1039
Assert.Equal("path", parameterPart.
Name
);
1056
Assert.Equal("path", parameterPart.
Name
);
Patterns\RoutePatternFactoryTest.cs (12)
484
Assert.Equal(paramPartB.
Name
, actual.Parameters[0].
Name
);
488
Assert.Equal(paramPartC.
Name
, actual.Parameters[1].
Name
);
492
Assert.Equal(paramPartD.
Name
, actual.Parameters[2].
Name
);
524
Assert.Equal(paramPartB.
Name
, actual.Parameters[0].
Name
);
528
Assert.Equal(paramPartC.
Name
, actual.Parameters[1].
Name
);
532
Assert.Equal(paramPartD.
Name
, actual.Parameters[2].
Name
);
Patterns\RoutePatternParserTest.cs (2)
729
x.
Name
== y.
Name
&&
Template\TemplateSegmentTest.cs (4)
38
Assert.Equal(paramPartC.
Name
, ((RoutePatternParameterPart)routePatternPathSegment.Parts[0]).
Name
);
44
Assert.Equal(paramPartB.
Name
, ((RoutePatternParameterPart)routePatternPathSegment.Parts[3]).
Name
);