25 instantiations of 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));
220 references to EventCallback
Aspire.Dashboard (5)
Components\Controls\GridValue.razor.cs (1)
71
public
EventCallback
<bool> IsMaskedChanged { get; set; }
Components\Controls\PropertyGrid.razor.cs (1)
130
public
EventCallback
<TItem> IsValueMaskedChanged { get; set; }
Components\Controls\ResourceSelect.razor.cs (1)
25
public
EventCallback
<SelectViewModel<ResourceTypeDetails>> SelectedResourceChanged { get; set; }
Components\Controls\SummaryDetailsView.razor.cs (1)
36
public
EventCallback
<SummaryDetailsSize> OnResize { get; set; }
Components\Resize\BrowserDimensionWatcher.cs (1)
15
public
EventCallback
<ViewportInformation?> ViewportInformationChanged { get; set; }
Microsoft.AspNetCore.Components (93)
CompilerServices\RuntimeHelpers.cs (4)
34
public static
EventCallback
<T> CreateInferredEventCallback<T>(object receiver, Action<T> callback, T value)
51
public static
EventCallback
<T> CreateInferredEventCallback<T>(object receiver, Func<T, Task> callback, T value)
68
public static
EventCallback
<T> CreateInferredEventCallback<T>(object receiver,
EventCallback
<T> callback, T value)
EventCallbackFactory.cs (11)
9
/// A factory for creating <see cref="EventCallback"/> and <see cref="
EventCallback
{T}"/>
91
public
EventCallback
<TValue> Create<TValue>(object receiver, EventCallback callback)
105
public
EventCallback
<TValue> Create<TValue>(object receiver,
EventCallback
<TValue> callback)
119
public
EventCallback
<TValue> Create<TValue>(object receiver, Action callback)
133
public
EventCallback
<TValue> Create<TValue>(object receiver, Action<TValue> callback)
147
public
EventCallback
<TValue> Create<TValue>(object receiver, Func<Task> callback)
161
public
EventCallback
<TValue> Create<TValue>(object receiver, Func<TValue, Task> callback)
177
public
EventCallback
<TValue> CreateInferred<TValue>(object receiver, Action<TValue> callback, TValue value)
191
public
EventCallback
<TValue> CreateInferred<TValue>(object receiver, Func<TValue, Task> callback, TValue value)
201
private static
EventCallback
<TValue> CreateCore<TValue>(object receiver, MulticastDelegate callback)
EventCallbackFactoryBinderExtensions.cs (68)
35
public static
EventCallback
<ChangeEventArgs> CreateBinder(
55
public static
EventCallback
<ChangeEventArgs> CreateBinder(
75
public static
EventCallback
<ChangeEventArgs> CreateBinder(
95
public static
EventCallback
<ChangeEventArgs> CreateBinder(
115
public static
EventCallback
<ChangeEventArgs> CreateBinder(
135
public static
EventCallback
<ChangeEventArgs> CreateBinder(
155
public static
EventCallback
<ChangeEventArgs> CreateBinder(
175
public static
EventCallback
<ChangeEventArgs> CreateBinder(
195
public static
EventCallback
<ChangeEventArgs> CreateBinder(
215
public static
EventCallback
<ChangeEventArgs> CreateBinder(
235
public static
EventCallback
<ChangeEventArgs> CreateBinder(
255
public static
EventCallback
<ChangeEventArgs> CreateBinder(
275
public static
EventCallback
<ChangeEventArgs> CreateBinder(
295
public static
EventCallback
<ChangeEventArgs> CreateBinder(
315
public static
EventCallback
<ChangeEventArgs> CreateBinder(
335
public static
EventCallback
<ChangeEventArgs> CreateBinder(
355
public static
EventCallback
<ChangeEventArgs> CreateBinder(
375
public static
EventCallback
<ChangeEventArgs> CreateBinder(
395
public static
EventCallback
<ChangeEventArgs> CreateBinder(
415
public static
EventCallback
<ChangeEventArgs> CreateBinder(
435
public static
EventCallback
<ChangeEventArgs> CreateBinder(
455
public static
EventCallback
<ChangeEventArgs> CreateBinder(
475
public static
EventCallback
<ChangeEventArgs> CreateBinder(
495
public static
EventCallback
<ChangeEventArgs> CreateBinder(
515
public static
EventCallback
<ChangeEventArgs> CreateBinder(
535
public static
EventCallback
<ChangeEventArgs> CreateBinder(
555
public static
EventCallback
<ChangeEventArgs> CreateBinder(
575
public static
EventCallback
<ChangeEventArgs> CreateBinder(
595
public static
EventCallback
<ChangeEventArgs> CreateBinder(
615
public static
EventCallback
<ChangeEventArgs> CreateBinder(
635
public static
EventCallback
<ChangeEventArgs> CreateBinder(
655
public static
EventCallback
<ChangeEventArgs> CreateBinder(
676
public static
EventCallback
<ChangeEventArgs> CreateBinder(
698
public static
EventCallback
<ChangeEventArgs> CreateBinder(
719
public static
EventCallback
<ChangeEventArgs> CreateBinder(
739
public static
EventCallback
<ChangeEventArgs> CreateBinder(
760
public static
EventCallback
<ChangeEventArgs> CreateBinder(
782
public static
EventCallback
<ChangeEventArgs> CreateBinder(
803
public static
EventCallback
<ChangeEventArgs> CreateBinder(
823
public static
EventCallback
<ChangeEventArgs> CreateBinder(
844
public static
EventCallback
<ChangeEventArgs> CreateBinder(
866
public static
EventCallback
<ChangeEventArgs> CreateBinder(
887
public static
EventCallback
<ChangeEventArgs> CreateBinder(
907
public static
EventCallback
<ChangeEventArgs> CreateBinder(
928
public static
EventCallback
<ChangeEventArgs> CreateBinder(
950
public static
EventCallback
<ChangeEventArgs> CreateBinder(
971
public static
EventCallback
<ChangeEventArgs> CreateBinder(
991
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1012
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1034
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1055
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1075
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1096
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1118
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1139
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1159
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1180
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1202
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1223
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1243
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1264
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1286
public static
EventCallback
<ChangeEventArgs> CreateBinder(
1308
public static
EventCallback
<ChangeEventArgs> CreateBinder<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(
1329
public static
EventCallback
<ChangeEventArgs> CreateBinder<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(
1339
private static
EventCallback
<ChangeEventArgs> CreateBinderCore<T>(
1382
private static
EventCallback
<ChangeEventArgs> CreateBinderCoreAsync<T>(
1425
private static
EventCallback
<ChangeEventArgs> CreateBinderCore<T>(
1469
private static
EventCallback
<ChangeEventArgs> CreateBinderCoreAsync<T>(
EventCallbackFactoryEventArgsExtensions.cs (4)
19
public static
EventCallback
<EventArgs> Create(this EventCallbackFactory factory, object receiver, Action<EventArgs> callback)
34
public static
EventCallback
<EventArgs> Create(this EventCallbackFactory factory, object receiver, Func<EventArgs, Task> callback)
49
public static
EventCallback
<ChangeEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<ChangeEventArgs> callback)
64
public static
EventCallback
<ChangeEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<ChangeEventArgs, Task> callback)
EventCallbackOfT.cs (4)
14
/// Gets an empty <see cref="
EventCallback
{TValue}"/>.
16
public static readonly
EventCallback
<TValue> Empty = new EventCallback<TValue>(null, (Action)(() => { }));
22
/// Creates the new <see cref="
EventCallback
{TValue}"/>.
81
=> obj is
EventCallback
<TValue> other
Rendering\RenderTreeBuilder.cs (1)
317
public void AddAttribute<TArgument>(int sequence, string name,
EventCallback
<TArgument> value)
Routing\Router.cs (1)
88
[Parameter] public
EventCallback
<NavigationContext> OnNavigateAsync { get; set; }
Microsoft.AspNetCore.Components.QuickGrid (5)
Infrastructure\EventCallbackSubscribable.cs (3)
14
private readonly Dictionary<EventCallbackSubscriber<T>,
EventCallback
<T>> _callbacks = new();
21
foreach (
var
callback in _callbacks.Values)
28
public void Subscribe(EventCallbackSubscriber<T> owner,
EventCallback
<T> callback)
Infrastructure\EventCallbackSubscriber.cs (2)
14
private readonly
EventCallback
<T> _handler;
17
public EventCallbackSubscriber(
EventCallback
<T> handler)
Microsoft.AspNetCore.Components.Tests (85)
EventCallbackFactoryBinderExtensionsTest.cs (33)
20
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
37
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
53
var
binder = EventCallback.Factory.CreateBinder(component, setter, 17);
72
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
89
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
106
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
125
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
144
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
163
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
182
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
201
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
220
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
239
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
258
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
277
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
296
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
315
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
334
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
353
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
372
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
391
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
410
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
430
var
binder = EventCallback.Factory.CreateBinder(component, setter, value, format);
450
var
binder = EventCallback.Factory.CreateBinder(component, setter, value, format);
469
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
488
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
508
var
binder = EventCallback.Factory.CreateBinder(component, setter, value, format);
528
var
binder = EventCallback.Factory.CreateBinder(component, setter, value, format);
548
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
568
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
587
var
binder = EventCallback.Factory.CreateBinder(component, setter, value);
622
var
binder = EventCallback.Factory.CreateBinder(component, setter, value, culture: null);
641
var
binder = EventCallback.Factory.CreateBinder(component, setter, value, CultureInfo.InvariantCulture);
EventCallbackFactoryTest.cs (28)
102
var
callback = EventCallback.Factory.Create(component, @delegate);
120
var
callback = EventCallback.Factory.Create(anotherComponent, @delegate);
138
var
callback = EventCallback.Factory.Create(anotherComponent, @delegate);
153
var
callback = EventCallback.Factory.Create(component, (Action<string>)null);
221
var
callback = EventCallback.Factory.Create(component, @delegate);
254
var
callback = EventCallback.Factory.Create(anotherComponent, @delegate);
272
var
callback = EventCallback.Factory.Create(anotherComponent, @delegate);
287
var
callback = EventCallback.Factory.Create(component, (Func<string, Task>)null);
301
var
input = new EventCallback<string>(component, @delegate);
306
var
callback = EventCallback.Factory.Create<string>(anotherComponent, input);
322
var
callback = EventCallback.Factory.Create<string>(component, @delegate);
340
var
callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate);
358
var
callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate);
373
var
callback = EventCallback.Factory.Create<string>(component, (Action)null);
389
var
callback = EventCallback.Factory.Create<string>(component, @delegate);
407
var
callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate);
422
var
callback = EventCallback.Factory.Create<string>(component, (Action<string>)null);
440
var
callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate);
456
var
callback = EventCallback.Factory.Create<string>(component, @delegate);
474
var
callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate);
492
var
callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate);
507
var
callback = EventCallback.Factory.Create<string>(component, (Func<Task>)null);
523
var
callback = EventCallback.Factory.Create<string>(component, @delegate);
541
var
callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate);
559
var
callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate);
574
var
callback = EventCallback.Factory.Create<string>(component, (Func<string, Task>)null);
590
var
callback = EventCallback.Factory.CreateInferred<string>(component, @delegate, "hi");
606
var
callback = EventCallback.Factory.CreateInferred<string>(component, @delegate, "hi");
EventCallbackTest.cs (11)
24
var
callback = default(
EventCallback
<EventArgs>);
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; }));
RendererTest.cs (1)
5298
public
EventCallback
<DerivedEventArgs> OnClickEventCallbackOfT { get; set; }
Rendering\RenderTreeBuilderTest.cs (11)
1274
var
callback = new EventCallback<string>(null, new Action<string>((s) => { }));
1293
var
callback = default(
EventCallback
<string>);
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) => { }));
1638
var
callback = default(
EventCallback
<string>);
1657
var
callback = new EventCallback<string>(receiver, new Action<string>((s) => { }));
2007
builder.AddAttribute(0, "6", default(
EventCallback
<string>)); // Replace with a 'silent' EventCallback<string>
RenderTreeDiffBuilderTest.cs (1)
1763
tree.AddComponentParameter(1, "MyEventCallbackOfT",
EventCallback
<int>.Empty);
Microsoft.AspNetCore.Components.Web (32)
Forms\EditForm.cs (3)
76
[Parameter] public
EventCallback
<EditContext> OnSubmit { get; set; }
82
[Parameter] public
EventCallback
<EditContext> OnValidSubmit { get; set; }
88
[Parameter] public
EventCallback
<EditContext> OnInvalidSubmit { get; set; }
Forms\Editor.cs (1)
30
[Parameter] public
EventCallback
<T> ValueChanged { get; set; } = default!;
Forms\InputBase.cs (1)
50
[Parameter] public
EventCallback
<TValue> ValueChanged { get; set; }
Forms\InputFile.cs (1)
26
public
EventCallback
<InputFileChangeEventArgs> OnChange { get; set; }
Forms\InputRadioContext.cs (2)
14
public
EventCallback
<ChangeEventArgs> ChangeEventCallback { get; }
21
public InputRadioContext(IInputRadioValueProvider valueProvider, InputRadioContext? parentContext,
EventCallback
<ChangeEventArgs> changeEventCallback)
Forms\InputRadioGroup.cs (1)
38
var
changeEventCallback = EventCallback.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString);
JSComponents\JSComponentInterop.cs (1)
170
var x when x.IsGenericType && x.GetGenericTypeDefinition() == typeof(
EventCallback
<>) => ParameterKind.EventCallbackWithSingleParameter,
Routing\NavigationLock.cs (2)
33
public
EventCallback
<LocationChangingContext> OnBeforeInternalNavigation { get; set; }
53
OnBeforeInternalNavigation = (
EventCallback
<LocationChangingContext>)parameter.Value;
Web\WebEventCallbackFactoryEventArgsExtensions.cs (20)
20
public static
EventCallback
<ClipboardEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<ClipboardEventArgs> callback)
36
public static
EventCallback
<ClipboardEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<ClipboardEventArgs, Task> callback)
52
public static
EventCallback
<DragEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<DragEventArgs> callback)
68
public static
EventCallback
<DragEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<DragEventArgs, Task> callback)
84
public static
EventCallback
<ErrorEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<ErrorEventArgs> callback)
100
public static
EventCallback
<ErrorEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<ErrorEventArgs, Task> callback)
116
public static
EventCallback
<FocusEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<FocusEventArgs> callback)
132
public static
EventCallback
<FocusEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<FocusEventArgs, Task> callback)
148
public static
EventCallback
<KeyboardEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<KeyboardEventArgs> callback)
164
public static
EventCallback
<KeyboardEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<KeyboardEventArgs, Task> callback)
180
public static
EventCallback
<MouseEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<MouseEventArgs> callback)
196
public static
EventCallback
<MouseEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<MouseEventArgs, Task> callback)
211
public static
EventCallback
<PointerEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<PointerEventArgs> callback)
227
public static
EventCallback
<PointerEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<PointerEventArgs, Task> callback)
243
public static
EventCallback
<ProgressEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<ProgressEventArgs> callback)
259
public static
EventCallback
<ProgressEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<ProgressEventArgs, Task> callback)
275
public static
EventCallback
<TouchEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<TouchEventArgs> callback)
291
public static
EventCallback
<TouchEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<TouchEventArgs, Task> callback)
307
public static
EventCallback
<WheelEventArgs> Create(this EventCallbackFactory factory, object receiver, Action<WheelEventArgs> callback)
323
public static
EventCallback
<WheelEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<WheelEventArgs, Task> callback)