43 references to AddAttribute
Microsoft.AspNetCore.Components.Endpoints.Tests (7)
EndpointHtmlRendererTest.cs (7)
983
builder.
AddAttribute
(1, "onsubmit", () => { eventReceivedCount++; component.TriggerRender(); });
1017
builder.
AddAttribute
(1, "onsubmit", () => { eventReceivedCount++; });
1509
builder.
AddAttribute
(1, "onsubmit", Handler ?? (() => { }));
1524
builder.
AddAttribute
(1, "onsubmit", () => { });
1529
builder.
AddAttribute
(1, "onsubmit", () => { GC.KeepAlive(new object()); });
1552
builder.
AddAttribute
(1, "onsubmit", !hasRendered
1571
builder.
AddAttribute
(1, "onsubmit", () => { });
Microsoft.AspNetCore.Components.Tests (30)
RendererTest.cs (7)
5316
builder.
AddAttribute
(3, "ontest", OnTest);
5320
builder.
AddAttribute
(3, "ontest", OnTestAsync);
5325
builder.
AddAttribute
(4, "onclick", OnClick);
5329
builder.
AddAttribute
(4, "onclick", OnClickAsync);
5342
builder.
AddAttribute
(5, "onclickaction", OnClickAction);
5346
builder.
AddAttribute
(5, "onclickaction", OnClickAsyncAction);
5912
builder.
AddAttribute
(2, "ontestevent", new Action<ChangeEventArgs>((ChangeEventArgs eventArgs) =>
Rendering\RenderTreeBuilderTest.cs (8)
242
builder.
AddAttribute
(0, "childevent", eventHandler); // 4: childevent=eventHandler>
463
builder.
AddAttribute
(0, "name", new Action<string>(text => { }));
508
builder.
AddAttribute
(2, "name", new Action<EventArgs>(eventInfo => { }));
1064
builder.
AddAttribute
(1, "attr", value);
1082
builder.
AddAttribute
(1, "attr", (Action<EventArgs>)null);
1101
builder.
AddAttribute
(1, "attr", value);
1119
builder.
AddAttribute
(1, "attr", (Action)null);
1143
builder.
AddAttribute
(1, "attr", value);
RenderTreeDiffBuilderTest.cs (8)
915
oldTree.
AddAttribute
(1, "onfoo", retainedHandler);
916
oldTree.
AddAttribute
(2, "onbar", removedHandler);
919
newTree.
AddAttribute
(1, "onfoo", retainedHandler);
920
newTree.
AddAttribute
(2, "onbar", addedHandler);
1653
oldTree.
AddAttribute
(1, "ontest", retainedHandler);
1656
newTree.
AddAttribute
(1, "ontest", retainedHandler);
1679
oldTree.
AddAttribute
(0, "ontest", retainedHandler);
1683
newTree.
AddAttribute
(0, "ontest", retainedHandler);
RenderTreeUpdaterTest.cs (7)
20
builder.
AddAttribute
(1, "eventname", (Action)(() => { }));
48
builder.
AddAttribute
(1, "eventname", (Action)(() => { }));
73
builder.
AddAttribute
(1, "eventname", (Action)(() => { }));
78
builder.
AddAttribute
(4, "eventname", (Action)(() => { }));
111
builder.
AddAttribute
(1, "eventname", (Action)(() => { }));
136
builder.
AddAttribute
(1, "eventname", (Action)(() => { }));
164
builder.
AddAttribute
(4, "eventname", (Action)(() => { }));
Microsoft.AspNetCore.Components.Web (1)
Forms\EditForm.cs (1)
153
builder.
AddAttribute
(5, "onsubmit", _handleSubmitDelegate);
Microsoft.AspNetCore.Components.Web.Tests (5)
Forms\Mapping\FormMappingScopeTest.cs (4)
34
builder.
AddAttribute
(2, nameof(FormMappingScope.ChildContent), contents);
56
b.
AddAttribute
(2, nameof(FormMappingScope.ChildContent), contents);
64
builder.
AddAttribute
(2, nameof(FormMappingScope.ChildContent), nested);
121
builder.
AddAttribute
(2, nameof(FormMappingScope.ChildContent), contents);
HtmlRendering\HtmlRendererTest.cs (1)
652
rtb.
AddAttribute
(2, "change", pc.GetValueOrDefault<Action<ChangeEventArgs>>("update"));