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