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