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