114 references to Factory
Aspire.Dashboard (4)
Components\Layout\AspirePageContentLayout.razor.cs (1)
91
OnDialogClosing = EventCallback.
Factory
.Create<DialogInstance>(this, async () =>
Components\Layout\MainLayout.razor.cs (2)
170
OnDialogClosing = EventCallback.
Factory
.Create<DialogInstance>(this, HandleDialogClose)
204
OnDialogClosing = EventCallback.
Factory
.Create<DialogInstance>(this, HandleDialogClose)
Model\DashboardCommandExecutor.cs (1)
93
toastParameters.OnPrimaryAction = EventCallback.
Factory
.Create<ToastResult>(this, () => navigationManager.NavigateTo(DashboardUrls.ConsoleLogsUrl(resource: resource.Name)));
Microsoft.AspNetCore.Components (3)
CompilerServices\RuntimeHelpers.cs (3)
36
return EventCallback.
Factory
.Create<T>(receiver, callback);
53
return EventCallback.
Factory
.Create<T>(receiver, callback);
70
return EventCallback.
Factory
.Create<T>(receiver, callback);
Microsoft.AspNetCore.Components.QuickGrid (2)
QuickGrid.razor.cs (2)
157
_currentPageItemsChanged = new(EventCallback.
Factory
.Create<PaginationState>(this, RefreshDataCoreAsync));
165
EventCallback.
Factory
.Create<object?>(this, RefreshDataCoreAsync));
Microsoft.AspNetCore.Components.Tests (96)
EventCallbackFactoryBinderExtensionsTest.cs (34)
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);
605
var ex = Assert.Throws<InvalidOperationException>(() => 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 (36)
19
var callback = EventCallback.
Factory
.Create(anotherComponent, input);
35
var callback = EventCallback.
Factory
.Create(component, @delegate);
53
var callback = EventCallback.
Factory
.Create(anotherComponent, @delegate);
71
var callback = EventCallback.
Factory
.Create(anotherComponent, @delegate);
86
var callback = EventCallback.
Factory
.Create(component, (Action)null);
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);
169
var callback = EventCallback.
Factory
.Create(component, @delegate);
187
var callback = EventCallback.
Factory
.Create(anotherComponent, @delegate);
205
var callback = EventCallback.
Factory
.Create(anotherComponent, @delegate);
221
var callback = EventCallback.
Factory
.Create(component, @delegate);
236
var callback = EventCallback.
Factory
.Create(component, (Func<Task>)null);
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);
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");
RendererTest.cs (26)
1104
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.
Factory
.Create(parentComponent, (Action)parentComponent.SomeMethod));
1142
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.
Factory
.Create(parentComponent, (Action)(() =>
1183
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.
Factory
.Create(parentComponent, (Func<Task>)(() =>
1223
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.
Factory
.Create<DerivedEventArgs>(parentComponent, (Action)parentComponent.SomeMethod));
1261
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.
Factory
.Create<DerivedEventArgs>(parentComponent, (Action)(() =>
1302
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.
Factory
.Create<DerivedEventArgs>(parentComponent, (Func<Task>)(() =>
1374
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.
Factory
.Create(parentComponent, (Action)(() =>
1408
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.
Factory
.Create(parentComponent, (Action<DerivedEventArgs>)((e) =>
1475
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.
Factory
.Create(parentComponent, (Action)(() =>
1509
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.
Factory
.Create(parentComponent, (Action<DerivedEventArgs>)((e) =>
1577
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.
Factory
.Create(parentComponent, (Action)(() =>
1611
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.
Factory
.Create<DerivedEventArgs>(parentComponent, (Action<DerivedEventArgs>)((e) =>
1684
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.
Factory
.Create(parentComponent, async () =>
1721
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.
Factory
.Create<DerivedEventArgs>(parentComponent, async (e) =>
1798
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.
Factory
.Create(parentComponent, async () =>
1838
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.
Factory
.Create<DerivedEventArgs>(parentComponent, async (e) =>
1917
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.
Factory
.Create(parentComponent, async () =>
1956
builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.
Factory
.Create<DerivedEventArgs>(parentComponent, async (e) =>
3122
builder.AddAttribute(1, "onchange", EventCallback.
Factory
.CreateBinder(
3161
builder.AddAttribute(1, "onchange", EventCallback.
Factory
.CreateBinder(
3195
builder.AddAttribute(1, "onchange", EventCallback.
Factory
.CreateBinder(
3235
builder.AddAttribute(1, "onchange", EventCallback.
Factory
.CreateBinder(
5442
builder.AddAttribute(1, "onmycustomevent", EventCallback.
Factory
.Create(this, eventArgs => OnClick(eventArgs)));
5489
builder.AddAttribute(3, "onchange", EventCallback.
Factory
.CreateBinder<bool>(this, __value => CheckboxEnabled = __value, CheckboxEnabled));
5493
builder.AddAttribute(6, "onchange", EventCallback.
Factory
.CreateBinder<string>(this, __value => SomeStringProperty = __value, SomeStringProperty));
6030
builder.AddAttribute(1, "onmakeerror", EventCallback.
Factory
.Create(this, () => { }));
Microsoft.AspNetCore.Components.Web (8)
Forms\InputCheckbox.cs (1)
45
builder.AddAttribute(7, "onchange", EventCallback.
Factory
.CreateBinder<bool>(this, __value => CurrentValue = __value, CurrentValue));
Forms\InputDate.cs (1)
92
builder.AddAttribute(6, "onchange", EventCallback.
Factory
.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Forms\InputNumber.cs (1)
61
builder.AddAttribute(7, "onchange", EventCallback.
Factory
.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Forms\InputRadioGroup.cs (1)
38
var changeEventCallback = EventCallback.
Factory
.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString);
Forms\InputSelect.cs (2)
50
builder.AddAttribute(6, "onchange", EventCallback.
Factory
.CreateBinder<string?[]?>(this, SetCurrentValueAsStringArray, default));
56
builder.AddAttribute(8, "onchange", EventCallback.
Factory
.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, default));
Forms\InputText.cs (1)
39
builder.AddAttribute(5, "onchange", EventCallback.
Factory
.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Forms\InputTextArea.cs (1)
39
builder.AddAttribute(5, "onchange", EventCallback.
Factory
.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Microsoft.AspNetCore.Components.Web.Tests (1)
Forms\TestInputHostComponent.cs (1)
31
EventCallback.
Factory
.Create(this, ValueChanged));