25 references to EventCallback
Microsoft.AspNetCore.Components (3)
EventCallbackFactory.cs (2)
95
return new
EventCallback
<TValue>(callback.Receiver, callback.Delegate);
203
return new
EventCallback
<TValue>(callback?.Target as IHandleEvent ?? receiver as IHandleEvent, callback);
EventCallbackOfT.cs (1)
16
public static readonly EventCallback<TValue> Empty = new
EventCallback
<TValue>(null, (Action)(() => { }));
Microsoft.AspNetCore.Components.Tests (21)
EventCallbackFactoryTest.cs (1)
301
var input = new
EventCallback
<string>(component, @delegate);
EventCallbackTest.cs (9)
49
var callback = new
EventCallback
<EventArgs>(null, (Action)(() => runCount++));
281
var callback = new
EventCallback
<EventArgs>(component, (Action)(() => runCount++));
298
var callback = new
EventCallback
<EventArgs>(component, (Action)(() => runCount++));
316
var callback = new
EventCallback
<EventArgs>(component, (Action<EventArgs>)((e) => { arg = e; runCount++; }));
335
var callback = new
EventCallback
<EventArgs>(component, (Action<EventArgs>)((e) => { arg = e; runCount++; }));
353
var callback = new
EventCallback
<EventArgs>(component, (Func<Task>)(() => { runCount++; return Task.CompletedTask; }));
370
var callback = new
EventCallback
<EventArgs>(component, (Func<Task>)(() => { runCount++; return Task.CompletedTask; }));
388
var callback = new
EventCallback
<EventArgs>(component, (Func<EventArgs, Task>)((e) => { arg = e; runCount++; return Task.CompletedTask; }));
407
var callback = new
EventCallback
<EventArgs>(component, (Func<EventArgs, Task>)((e) => { arg = e; runCount++; return Task.CompletedTask; }));
Rendering\RenderTreeBuilderTest.cs (6)
1274
var callback = new
EventCallback
<string>(null, new Action<string>((s) => { }));
1312
var callback = new
EventCallback
<string>(receiver, new Action<string>((s) => { }));
1332
var callback = new
EventCallback
<string>(receiver, new Action<string>((s) => { }));
1352
var callback = new
EventCallback
<string>(receiver, new Action<string>((s) => { }));
1619
var callback = new
EventCallback
<string>(null, new Action<string>((s) => { }));
1657
var callback = new
EventCallback
<string>(receiver, new Action<string>((s) => { }));
Routing\RouterTest.cs (5)
47
_router.OnNavigateAsync = new
EventCallback
<NavigationContext>(null, OnNavigateAsync);
76
_router.OnNavigateAsync = new
EventCallback
<NavigationContext>(null, OnNavigateAsync);
116
_router.OnNavigateAsync = new
EventCallback
<NavigationContext>(null, OnNavigateAsync);
137
_router.OnNavigateAsync = new
EventCallback
<NavigationContext>(null, OnNavigateAsync);
169
_router.OnNavigateAsync = new
EventCallback
<NavigationContext>(null, OnNavigateAsync);
Microsoft.AspNetCore.Components.Web.Tests (1)
Forms\EditFormTest.cs (1)
265
builder.AddComponentParameter(4, "OnValidSubmit", new
EventCallback
<EditContext>(null, SubmitHandler));