27 references to EventCallback
Microsoft.AspNetCore.Components (3)
EventCallbackFactory.cs (2)
95return new EventCallback<TValue>(callback.Receiver, callback.Delegate); 203return new EventCallback<TValue>(callback?.Target as IHandleEvent ?? receiver as IHandleEvent, callback);
EventCallbackOfT.cs (1)
16public static readonly EventCallback<TValue> Empty = new EventCallback<TValue>(null, (Action)(() => { }));
Microsoft.AspNetCore.Components.Tests (23)
EventCallbackFactoryTest.cs (1)
301var input = new EventCallback<string>(component, @delegate);
EventCallbackTest.cs (11)
49var callback = new EventCallback<EventArgs>(null, (Action)(() => runCount++)); 299var callback = new EventCallback<EventArgs>(component, (Action)(() => runCount++)); 316var callback = new EventCallback<EventArgs>(component, (Action)(() => runCount++)); 334var callback = new EventCallback<EventArgs>(component, (Action<EventArgs>)((e) => { arg = e; runCount++; })); 353var callback = new EventCallback<EventArgs>(component, (Action<EventArgs>)((e) => { arg = e; runCount++; })); 371var callback = new EventCallback<EventArgs>(component, (Func<Task>)(() => { runCount++; return Task.CompletedTask; })); 388var callback = new EventCallback<EventArgs>(component, (Func<Task>)(() => { runCount++; return Task.CompletedTask; })); 406var callback = new EventCallback<EventArgs>(component, (Func<EventArgs, Task>)((e) => { arg = e; runCount++; return Task.CompletedTask; })); 425var callback = new EventCallback<EventArgs>(component, (Func<EventArgs, Task>)((e) => { arg = e; runCount++; return Task.CompletedTask; })); 444var eventcallback_1 = new EventCallback<EventArgs>(component, delegate_1); 445var eventcallback_2 = new EventCallback<EventArgs>(component, delegate_2);
Rendering\RenderTreeBuilderTest.cs (6)
1274var callback = new EventCallback<string>(null, new Action<string>((s) => { })); 1312var callback = new EventCallback<string>(receiver, new Action<string>((s) => { })); 1332var callback = new EventCallback<string>(receiver, new Action<string>((s) => { })); 1352var callback = new EventCallback<string>(receiver, new Action<string>((s) => { })); 1619var callback = new EventCallback<string>(null, new Action<string>((s) => { })); 1657var 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)
265builder.AddComponentParameter(4, "OnValidSubmit", new EventCallback<EditContext>(null, SubmitHandler));