2 writes to IsOptional
Microsoft.AspNetCore.Routing (2)
Template\TemplatePart.cs (2)
42
IsOptional
= parameter.IsOptional;
95
IsOptional
= isOptional,
28 references to IsOptional
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
359
IsOptional = routeParameter.
IsOptional
|| routeParameter.DefaultValue != null,
Microsoft.AspNetCore.Routing (6)
RouteBase.cs (1)
221
if (parameter.
IsOptional
)
Template\TemplatePart.cs (2)
143
return "{" + (IsCatchAll ? "*" : string.Empty) + Name + (
IsOptional
? "?" : string.Empty) + "}";
169
IsOptional
?
Tree\TreeRouteBuilder.cs (2)
120
if (parameter.
IsOptional
)
205
if (parameter.
IsOptional
)
Tree\UrlMatchingTree.cs (1)
268
var isOptionlCatchAllOrHasDefaultValue = part.
IsOptional
||
Microsoft.AspNetCore.Routing.Tests (21)
InlineRouteParameterParserTests.cs (19)
113
Assert.True(templatePart.
IsOptional
);
128
Assert.True(templatePart.
IsOptional
);
143
Assert.True(templatePart.
IsOptional
);
157
Assert.True(templatePart.
IsOptional
);
171
Assert.True(templatePart.
IsOptional
);
285
Assert.False(param1.
IsOptional
);
295
Assert.False(param2.
IsOptional
);
299
Assert.True(param3.
IsOptional
);
516
Assert.True(templatePart.
IsOptional
);
781
Assert.False(templatePart.
IsOptional
);
796
Assert.True(templatePart.
IsOptional
);
811
Assert.False(templatePart.
IsOptional
);
826
Assert.True(templatePart.
IsOptional
);
841
Assert.False(templatePart.
IsOptional
);
856
Assert.False(templatePart.
IsOptional
);
872
Assert.False(templatePart.
IsOptional
);
887
Assert.False(templatePart.
IsOptional
);
902
Assert.False(templatePart.
IsOptional
);
917
Assert.False(templatePart.
IsOptional
);
Template\TemplateParserTests.cs (2)
871
x.
IsOptional
!= y.
IsOptional
||