2 writes to DefaultValue
Microsoft.AspNetCore.Routing (2)
Template\TemplatePart.cs (2)
43
DefaultValue
= parameter.Default;
96
DefaultValue
= defaultValue,
57 references to DefaultValue
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
DefaultApiDescriptionProvider.cs (2)
358
DefaultValue = routeParameter.
DefaultValue
,
359
IsOptional = routeParameter.IsOptional || routeParameter.
DefaultValue
!= null,
Microsoft.AspNetCore.Routing (8)
RouteBase.cs (2)
248
if (parameter.
DefaultValue
!= null)
266
result.Add(parameter.Name!, parameter.
DefaultValue
);
Template\TemplatePart.cs (1)
174
return RoutePatternFactory.ParameterPart(Name!,
DefaultValue
, kind, constraints);
Tree\TreeRouteBuilder.cs (4)
150
if (parameter.
DefaultValue
!= null)
152
entry.Defaults.Add(parameter.Name, parameter.
DefaultValue
);
222
if (parameter.
DefaultValue
!= null)
224
entry.Defaults.Add(parameter.Name, parameter.
DefaultValue
);
Tree\UrlMatchingTree.cs (1)
270
part.
DefaultValue
!= null;
Microsoft.AspNetCore.Routing.Tests (47)
InlineRouteParameterParserTests.cs (47)
23
Assert.Null(templatePart.
DefaultValue
);
35
Assert.Equal("", templatePart.
DefaultValue
);
47
Assert.Null(templatePart.
DefaultValue
);
60
Assert.Equal("", templatePart.
DefaultValue
);
73
Assert.Equal(":", templatePart.
DefaultValue
);
85
Assert.Equal("111111", templatePart.
DefaultValue
);
99
Assert.Equal("111111", templatePart.
DefaultValue
);
127
Assert.Equal("12", templatePart.
DefaultValue
);
142
Assert.Equal("12?", templatePart.
DefaultValue
);
173
Assert.Equal("abc", templatePart.
DefaultValue
);
232
Assert.Equal("qwer", templatePart.
DefaultValue
);
248
Assert.Equal("=qwer", templatePart.
DefaultValue
);
267
Assert.Equal(defaultValue, templatePart.
DefaultValue
);
284
Assert.Equal("hello", param1.
DefaultValue
);
294
Assert.Equal("abc", param2.
DefaultValue
);
320
Assert.Equal("world", templatePart.
DefaultValue
);
345
Assert.Equal("wer", templatePart.
DefaultValue
);
373
Assert.Equal("fsd", templatePart.
DefaultValue
);
401
Assert.Equal("mnf", templatePart.
DefaultValue
);
429
Assert.Equal("12", templatePart.
DefaultValue
);
444
Assert.Equal("12", templatePart.
DefaultValue
);
500
Assert.Equal("jsd", templatePart.
DefaultValue
);
514
Assert.Equal("", templatePart.
DefaultValue
);
530
Assert.Null(templatePart.
DefaultValue
);
544
Assert.Equal("test=bar", templatePart.
DefaultValue
);
555
Assert.Null(templatePart.
DefaultValue
);
569
Assert.Equal("dvds", templatePart.
DefaultValue
);
583
Assert.Equal("=am:test=dvds", templatePart.
DefaultValue
);
594
Assert.Equal("=dvds", templatePart.
DefaultValue
);
605
Assert.Equal("am:test(asd)", templatePart.
DefaultValue
);
616
Assert.Equal("test(am):est=asd", templatePart.
DefaultValue
);
627
Assert.Equal("sds", templatePart.
DefaultValue
);
668
Assert.Equal("xvc", templatePart.
DefaultValue
);
735
Assert.Equal("default-value", templatePart.
DefaultValue
);
751
Assert.Equal("test1", templatePart.
DefaultValue
);
766
Assert.Equal("djk", templatePart.
DefaultValue
);
780
Assert.Null(templatePart.
DefaultValue
);
795
Assert.Null(templatePart.
DefaultValue
);
810
Assert.Equal("sdf", templatePart.
DefaultValue
);
825
Assert.Equal("sdf", templatePart.
DefaultValue
);
840
Assert.Null(templatePart.
DefaultValue
);
855
Assert.Null(templatePart.
DefaultValue
);
871
Assert.Null(templatePart.
DefaultValue
);
886
Assert.Null(templatePart.
DefaultValue
);
901
Assert.Null(templatePart.
DefaultValue
);
916
Assert.Equal("123-456-7890", templatePart.
DefaultValue
);
941
Assert.Null(templatePart.
DefaultValue
);