35 references to IsOptional
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
209
Assert.True(routeParameter.IsOptional == parsedRoutePattern.
IsOptional
, "IsOptional");
Microsoft.AspNetCore.Mvc.Core (1)
Routing\RoutePatternWriter.cs (1)
56
if (parameterPart.
IsOptional
)
Microsoft.AspNetCore.Routing (14)
DefaultParameterPolicyFactory.cs (2)
29
return InitializeRouteConstraint(parameter?.
IsOptional
?? false, routeConstraint);
55
return InitializeRouteConstraint(parameter?.
IsOptional
?? false, constraint);
Matching\DfaMatcherBuilder.cs (2)
396
Debug.Assert(i == segment.Parts.Count - 1 && partParameter.
IsOptional
);
866
if (!parameterPart.
IsOptional
&&
Patterns\RoutePatternFactory.cs (1)
589
if (parameter.
IsOptional
)
Patterns\RoutePatternMatcher.cs (3)
138
if (!_hasDefaultValue[i] && !parameter.
IsOptional
)
232
!part.
IsOptional
)
302
if (routeSegment.Parts[indexOfLastSegment] is RoutePatternParameterPart parameter && parameter.
IsOptional
&&
Patterns\RoutePatternParameterPart.cs (1)
111
if (
IsOptional
)
Patterns\RoutePatternParser.cs (2)
223
if (templatePart.
IsOptional
&& templatePart.Default != null)
357
if (part is RoutePatternParameterPart parameter && parameter.
IsOptional
&& parts.Count > 1)
Template\TemplateBinder.cs (2)
333
else if (parameter.
IsOptional
|| parameter.IsCatchAll)
576
if (j != 0 && parameterPart.
IsOptional
&& parts[j - 1] is RoutePatternSeparatorPart)
Template\TemplatePart.cs (1)
42
IsOptional = parameter.
IsOptional
;
Microsoft.AspNetCore.Routing.Tests (19)
Patterns\InlineRouteParameterParserTest.cs (19)
106
Assert.True(templatePart.
IsOptional
);
121
Assert.True(templatePart.
IsOptional
);
136
Assert.True(templatePart.
IsOptional
);
150
Assert.True(templatePart.
IsOptional
);
164
Assert.True(templatePart.
IsOptional
);
277
Assert.False(param1.
IsOptional
);
287
Assert.False(param2.
IsOptional
);
291
Assert.True(param3.
IsOptional
);
508
Assert.True(templatePart.
IsOptional
);
773
Assert.False(templatePart.
IsOptional
);
788
Assert.True(templatePart.
IsOptional
);
803
Assert.False(templatePart.
IsOptional
);
818
Assert.True(templatePart.
IsOptional
);
833
Assert.False(templatePart.
IsOptional
);
848
Assert.False(templatePart.
IsOptional
);
864
Assert.False(templatePart.
IsOptional
);
879
Assert.False(templatePart.
IsOptional
);
894
Assert.False(templatePart.
IsOptional
);
909
Assert.False(templatePart.
IsOptional
);