12 references to GetValueOrDefault
Microsoft.AspNetCore.Components (1)
Sections\SectionOutlet.cs (1)
139
var fragment = parameters.
GetValueOrDefault
<RenderFragment>(ContentParameterName)!;
Microsoft.AspNetCore.Components.Server.Tests (2)
Circuits\RemoteRendererTest.cs (2)
789
Content = parameters.
GetValueOrDefault
<RenderFragment>(nameof(Content));
790
Trigger ??= parameters.
GetValueOrDefault
<Trigger>(nameof(Trigger));
Microsoft.AspNetCore.Components.Tests (6)
ParameterViewTest.cs (5)
158
var result = parameters.
GetValueOrDefault
<object>("my entry");
177
var result = parameters.
GetValueOrDefault
<object>("my entry");
197
var result = parameters.
GetValueOrDefault
<DateTime>("nonexisting entry");
314
var result = parameters.
GetValueOrDefault
<object>("my entry");
337
Assert.Throws<InvalidOperationException>(() => parameterView.
GetValueOrDefault
<object>("anything"));
RendererTest.cs (1)
4459
Assert.Throws<InvalidOperationException>(() => parameterView.
GetValueOrDefault
<object>("anything"));
Microsoft.AspNetCore.Components.Web.Tests (3)
HtmlRendering\HtmlRendererTest.cs (3)
652
rtb.AddAttribute(2, "change", pc.
GetValueOrDefault
<Action<ChangeEventArgs>>("update"));
653
rtb.AddAttribute(3, "value", pc.
GetValueOrDefault
<int>("value"));
1277
var content = parameters.
GetValueOrDefault
<string>("Value");