30 references to EventCallback
Microsoft.AspNetCore.Components (4)
EventCallback.cs (1)
21public static readonly EventCallback Empty = new EventCallback(null, (Action)(() => { }));
EventCallbackFactory.cs (1)
198return new EventCallback(callback?.Target as IHandleEvent ?? receiver as IHandleEvent, callback);
EventCallbackOfT.cs (1)
67return new EventCallback(Receiver ?? Delegate?.Target as IHandleEvent, Delegate);
RenderTree\Renderer.cs (1)
638_eventBindings.Add(id, (renderedByComponentId, new EventCallback(@delegate.Target as IHandleEvent, @delegate)));
Microsoft.AspNetCore.Components.Tests (25)
EventCallbackFactoryTest.cs (1)
14var input = new EventCallback(component, @delegate);
EventCallbackTest.cs (13)
35var callback = new EventCallback(null, (Action)(() => runCount++)); 65var callback = new EventCallback(component, (Action)(() => runCount++)); 82var callback = new EventCallback(component, (Action)(() => runCount++)); 100var callback = new EventCallback(component, (Action<EventArgs>)((e) => { arg = e; runCount++; })); 119var callback = new EventCallback(component, (Action<EventArgs>)((e) => { arg = e; runCount++; })); 138var callback = new EventCallback(component, (Action<int>)((e) => { arg = e; runCount++; })); 157var callback = new EventCallback(component, (Action<EventArgs>)((e) => { arg = e; runCount++; })); 173var callback = new EventCallback(component, (Func<Task>)(() => { runCount++; return Task.CompletedTask; })); 190var callback = new EventCallback(component, (Func<Task>)(() => { runCount++; return Task.CompletedTask; })); 208var callback = new EventCallback(component, (Func<EventArgs, Task>)((e) => { arg = e; runCount++; return Task.CompletedTask; })); 227var callback = new EventCallback(component, (Func<EventArgs, Task>)((e) => { arg = e; runCount++; return Task.CompletedTask; })); 246var callback = new EventCallback(component, (Func<int, Task>)((e) => { arg = e; runCount++; return Task.CompletedTask; })); 265var callback = new EventCallback(component, (Func<EventArgs, Task>)((e) => { arg = e; runCount++; return Task.CompletedTask; }));
Rendering\RenderTreeBuilderTest.cs (11)
1177var callback = new EventCallback(null, new Action(() => { })); 1215var callback = new EventCallback(receiver, new Action(() => { })); 1235var callback = new EventCallback(receiver, new Action(() => { })); 1255var callback = new EventCallback(receiver, new Action(() => { })); 1323frame => AssertFrame.Attribute(frame, "attr", new EventCallback(callback.Receiver, callback.Delegate), 1)); 1542var callback = new EventCallback(null, new Action(() => { })); 1580var callback = new EventCallback(receiver, new Action(() => { })); 1600var callback = new EventCallback(receiver, new Action(() => { })); 1668frame => AssertFrame.Attribute(frame, "attr", new EventCallback(callback.Receiver, callback.Delegate), 1)); 1992builder.AddAttribute(0, "2", new EventCallback(null, (Action)(() => { }))); 2005{ "6", new EventCallback(null, (Action)(() =>{ })) },
Microsoft.AspNetCore.Components.Web (1)
JSComponents\JSComponentInterop.cs (1)
178return new(null, callback);