114 references to Factory
Aspire.Dashboard (4)
Components\Layout\AspirePageContentLayout.razor.cs (1)
91OnDialogClosing = EventCallback.Factory.Create<DialogInstance>(this, async () =>
Components\Layout\MainLayout.razor.cs (2)
170OnDialogClosing = EventCallback.Factory.Create<DialogInstance>(this, HandleDialogClose) 204OnDialogClosing = EventCallback.Factory.Create<DialogInstance>(this, HandleDialogClose)
Model\DashboardCommandExecutor.cs (1)
93toastParameters.OnPrimaryAction = EventCallback.Factory.Create<ToastResult>(this, () => navigationManager.NavigateTo(DashboardUrls.ConsoleLogsUrl(resource: resource.Name)));
Microsoft.AspNetCore.Components (3)
CompilerServices\RuntimeHelpers.cs (3)
36return EventCallback.Factory.Create<T>(receiver, callback); 53return EventCallback.Factory.Create<T>(receiver, callback); 70return EventCallback.Factory.Create<T>(receiver, callback);
Microsoft.AspNetCore.Components.QuickGrid (2)
QuickGrid.razor.cs (2)
157_currentPageItemsChanged = new(EventCallback.Factory.Create<PaginationState>(this, RefreshDataCoreAsync)); 165EventCallback.Factory.Create<object?>(this, RefreshDataCoreAsync));
Microsoft.AspNetCore.Components.Tests (96)
EventCallbackFactoryBinderExtensionsTest.cs (34)
20var binder = EventCallback.Factory.CreateBinder(component, setter, value); 37var binder = EventCallback.Factory.CreateBinder(component, setter, value); 53var binder = EventCallback.Factory.CreateBinder(component, setter, 17); 72var binder = EventCallback.Factory.CreateBinder(component, setter, value); 89var binder = EventCallback.Factory.CreateBinder(component, setter, value); 106var binder = EventCallback.Factory.CreateBinder(component, setter, value); 125var binder = EventCallback.Factory.CreateBinder(component, setter, value); 144var binder = EventCallback.Factory.CreateBinder(component, setter, value); 163var binder = EventCallback.Factory.CreateBinder(component, setter, value); 182var binder = EventCallback.Factory.CreateBinder(component, setter, value); 201var binder = EventCallback.Factory.CreateBinder(component, setter, value); 220var binder = EventCallback.Factory.CreateBinder(component, setter, value); 239var binder = EventCallback.Factory.CreateBinder(component, setter, value); 258var binder = EventCallback.Factory.CreateBinder(component, setter, value); 277var binder = EventCallback.Factory.CreateBinder(component, setter, value); 296var binder = EventCallback.Factory.CreateBinder(component, setter, value); 315var binder = EventCallback.Factory.CreateBinder(component, setter, value); 334var binder = EventCallback.Factory.CreateBinder(component, setter, value); 353var binder = EventCallback.Factory.CreateBinder(component, setter, value); 372var binder = EventCallback.Factory.CreateBinder(component, setter, value); 391var binder = EventCallback.Factory.CreateBinder(component, setter, value); 410var binder = EventCallback.Factory.CreateBinder(component, setter, value); 430var binder = EventCallback.Factory.CreateBinder(component, setter, value, format); 450var binder = EventCallback.Factory.CreateBinder(component, setter, value, format); 469var binder = EventCallback.Factory.CreateBinder(component, setter, value); 488var binder = EventCallback.Factory.CreateBinder(component, setter, value); 508var binder = EventCallback.Factory.CreateBinder(component, setter, value, format); 528var binder = EventCallback.Factory.CreateBinder(component, setter, value, format); 548var binder = EventCallback.Factory.CreateBinder(component, setter, value); 568var binder = EventCallback.Factory.CreateBinder(component, setter, value); 587var binder = EventCallback.Factory.CreateBinder(component, setter, value); 605var ex = Assert.Throws<InvalidOperationException>(() => EventCallback.Factory.CreateBinder(component, setter, value)); 622var binder = EventCallback.Factory.CreateBinder(component, setter, value, culture: null); 641var binder = EventCallback.Factory.CreateBinder(component, setter, value, CultureInfo.InvariantCulture);
EventCallbackFactoryTest.cs (36)
19var callback = EventCallback.Factory.Create(anotherComponent, input); 35var callback = EventCallback.Factory.Create(component, @delegate); 53var callback = EventCallback.Factory.Create(anotherComponent, @delegate); 71var callback = EventCallback.Factory.Create(anotherComponent, @delegate); 86var callback = EventCallback.Factory.Create(component, (Action)null); 102var callback = EventCallback.Factory.Create(component, @delegate); 120var callback = EventCallback.Factory.Create(anotherComponent, @delegate); 138var callback = EventCallback.Factory.Create(anotherComponent, @delegate); 153var callback = EventCallback.Factory.Create(component, (Action<string>)null); 169var callback = EventCallback.Factory.Create(component, @delegate); 187var callback = EventCallback.Factory.Create(anotherComponent, @delegate); 205var callback = EventCallback.Factory.Create(anotherComponent, @delegate); 221var callback = EventCallback.Factory.Create(component, @delegate); 236var callback = EventCallback.Factory.Create(component, (Func<Task>)null); 254var callback = EventCallback.Factory.Create(anotherComponent, @delegate); 272var callback = EventCallback.Factory.Create(anotherComponent, @delegate); 287var callback = EventCallback.Factory.Create(component, (Func<string, Task>)null); 306var callback = EventCallback.Factory.Create<string>(anotherComponent, input); 322var callback = EventCallback.Factory.Create<string>(component, @delegate); 340var callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate); 358var callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate); 373var callback = EventCallback.Factory.Create<string>(component, (Action)null); 389var callback = EventCallback.Factory.Create<string>(component, @delegate); 407var callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate); 422var callback = EventCallback.Factory.Create<string>(component, (Action<string>)null); 440var callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate); 456var callback = EventCallback.Factory.Create<string>(component, @delegate); 474var callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate); 492var callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate); 507var callback = EventCallback.Factory.Create<string>(component, (Func<Task>)null); 523var callback = EventCallback.Factory.Create<string>(component, @delegate); 541var callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate); 559var callback = EventCallback.Factory.Create<string>(anotherComponent, @delegate); 574var callback = EventCallback.Factory.Create<string>(component, (Func<string, Task>)null); 590var callback = EventCallback.Factory.CreateInferred<string>(component, @delegate, "hi"); 606var callback = EventCallback.Factory.CreateInferred<string>(component, @delegate, "hi");
RendererTest.cs (26)
1104builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, (Action)parentComponent.SomeMethod)); 1142builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, (Action)(() => 1183builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, (Func<Task>)(() => 1223builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create<DerivedEventArgs>(parentComponent, (Action)parentComponent.SomeMethod)); 1261builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create<DerivedEventArgs>(parentComponent, (Action)(() => 1302builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create<DerivedEventArgs>(parentComponent, (Func<Task>)(() => 1374builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, (Action)(() => 1408builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action<DerivedEventArgs>)((e) => 1475builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, (Action)(() => 1509builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create(parentComponent, (Action<DerivedEventArgs>)((e) => 1577builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, (Action)(() => 1611builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create<DerivedEventArgs>(parentComponent, (Action<DerivedEventArgs>)((e) => 1684builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, async () => 1721builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create<DerivedEventArgs>(parentComponent, async (e) => 1798builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, async () => 1838builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create<DerivedEventArgs>(parentComponent, async (e) => 1917builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, async () => 1956builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create<DerivedEventArgs>(parentComponent, async (e) => 3122builder.AddAttribute(1, "onchange", EventCallback.Factory.CreateBinder( 3161builder.AddAttribute(1, "onchange", EventCallback.Factory.CreateBinder( 3195builder.AddAttribute(1, "onchange", EventCallback.Factory.CreateBinder( 3235builder.AddAttribute(1, "onchange", EventCallback.Factory.CreateBinder( 5442builder.AddAttribute(1, "onmycustomevent", EventCallback.Factory.Create(this, eventArgs => OnClick(eventArgs))); 5489builder.AddAttribute(3, "onchange", EventCallback.Factory.CreateBinder<bool>(this, __value => CheckboxEnabled = __value, CheckboxEnabled)); 5493builder.AddAttribute(6, "onchange", EventCallback.Factory.CreateBinder<string>(this, __value => SomeStringProperty = __value, SomeStringProperty)); 6030builder.AddAttribute(1, "onmakeerror", EventCallback.Factory.Create(this, () => { }));
Microsoft.AspNetCore.Components.Web (8)
Forms\InputCheckbox.cs (1)
45builder.AddAttribute(7, "onchange", EventCallback.Factory.CreateBinder<bool>(this, __value => CurrentValue = __value, CurrentValue));
Forms\InputDate.cs (1)
92builder.AddAttribute(6, "onchange", EventCallback.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Forms\InputNumber.cs (1)
61builder.AddAttribute(7, "onchange", EventCallback.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Forms\InputRadioGroup.cs (1)
38var changeEventCallback = EventCallback.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString);
Forms\InputSelect.cs (2)
50builder.AddAttribute(6, "onchange", EventCallback.Factory.CreateBinder<string?[]?>(this, SetCurrentValueAsStringArray, default)); 56builder.AddAttribute(8, "onchange", EventCallback.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, default));
Forms\InputText.cs (1)
39builder.AddAttribute(5, "onchange", EventCallback.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Forms\InputTextArea.cs (1)
39builder.AddAttribute(5, "onchange", EventCallback.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Microsoft.AspNetCore.Components.Web.Tests (1)
Forms\TestInputHostComponent.cs (1)
31EventCallback.Factory.Create(this, ValueChanged));