5 instantiations of EventCallback
Microsoft.AspNetCore.Components (4)
EventCallback.cs (1)
21
public static readonly EventCallback Empty = new
EventCallback
(null, (Action)(() => { }));
EventCallbackFactory.cs (1)
198
return new
EventCallback
(callback?.Target as IHandleEvent ?? receiver as IHandleEvent, callback);
EventCallbackOfT.cs (1)
67
return new
EventCallback
(Receiver ?? Delegate?.Target as IHandleEvent, Delegate);
RenderTree\Renderer.cs (1)
738
_eventBindings.Add(id, (renderedByComponentId, new
EventCallback
(@delegate.Target as IHandleEvent, @delegate), frame.AttributeName));
Microsoft.AspNetCore.Components.Web (1)
JSComponents\JSComponentInterop.cs (1)
187
return
new
(null, callback);
139 references to EventCallback
Aspire.Dashboard (37)
Components\Controls\AspireMenu.razor.cs (1)
47
public
EventCallback
OnSecondaryActionComplete { get; set; }
Components\Controls\IconCheckbox.razor.cs (1)
55
public
EventCallback
OnClick { get; set; }
Components\Controls\PropertyValues\TraceIdButtonValue.razor.cs (1)
18
public
EventCallback
OnClick { get; set; }
Components\Controls\ResourceActions.razor.cs (1)
79
EventCallback
.Factory.Create(this, () => OnViewDetails.InvokeAsync(_menuButton?.MenuButtonId)),
Components\Controls\ResourceDetails.razor.cs (1)
306
EventCallback
.Empty, // View details not shown since we're already in the details view
Components\Controls\SpanActions.razor.cs (1)
38
EventCallback
.Factory.Create(this, () => OnViewDetails.InvokeAsync(_menuButton?.MenuButtonId)),
Components\Controls\SpanDetails.razor.cs (2)
24
public
EventCallback
CloseCallback { get; set; }
101
EventCallback
.Empty,
Components\Controls\StructuredLogActions.razor.cs (1)
34
EventCallback
.Factory.Create(this, () => OnViewDetails.InvokeAsync(_menuButton?.MenuButtonId)));
Components\Controls\StructuredLogDetails.razor.cs (2)
20
public
EventCallback
CloseCallback { get; set; }
138
StructuredLogMenuBuilder.AddMenuItems(_logActionsMenuItems, ViewModel.LogEntry,
EventCallback
.Empty, showViewDetails: false);
Components\Controls\SummaryDetailsView.razor.cs (1)
33
public
EventCallback
OnDismiss { get; set; }
Components\Dialogs\NotificationEntryComponent.razor.cs (1)
17
public
EventCallback
OnDismiss { get; set; }
Components\Interactions\InteractionsProvider.cs (3)
165
dialogParameters.OnDialogResult =
EventCallback
.Factory.Create<DialogResult>(this, async dialogResult =>
226
dialogParameters.OnDialogResult =
EventCallback
.Factory.Create<DialogResult>(this, async dialogResult =>
259
dialogParameters.OnDialogResult =
EventCallback
.Factory.Create<DialogResult>(this, async dialogResult =>
Components\Layout\AspirePageContentLayout.razor.cs (1)
97
OnDialogClosing =
EventCallback
.Factory.Create<IDialogInstance>(this, async () =>
Components\Layout\MainLayout.razor.cs (4)
336
OnDialogClosing =
EventCallback
.Factory.Create<IDialogInstance>(this, _ => HandleDialogClose(GetVisibleReturnFocusElementId(returnFocusElementId, HelpButtonId)))
394
OnDialogClosing =
EventCallback
.Factory.Create<IDialogInstance>(this, _ => HandleDialogClose())
418
OnDialogClosing =
EventCallback
.Factory.Create<IDialogInstance>(this, _ => HandleDialogClose(GetVisibleReturnFocusElementId(returnFocusElementId, SettingsButtonId)))
443
OnDialogClosing =
EventCallback
.Factory.Create<IDialogInstance>(this, _ => HandleDialogClose())
Components\Pages\ConsoleLogs.razor.cs (3)
746
EventCallback
.Factory.Create<bool>(this, async
791
EventCallback
.Factory.Create(this, () =>
796
EventCallback
.Factory.Create<CommandViewModel>(this, ExecuteResourceCommandAsync),
Components\Pages\Resources.razor.cs (7)
41
private
EventCallback
_onToggleCollapseAllCallback;
42
private
EventCallback
_onToggleResourceTypeCallback;
204
_onToggleCollapseAllCallback =
EventCallback
.Factory.Create(this, OnToggleCollapseAll);
205
_onToggleResourceTypeCallback =
EventCallback
.Factory.Create(this, OnToggleResourceType);
542
EventCallback
.Factory.Create<bool>(
657
EventCallback
.Factory.Create(this, () => ShowResourceDetailsAsync(resource, focusElementId)),
658
EventCallback
.Factory.Create<CommandViewModel>(this, (command) => ExecuteResourceCommandAsync(resource, command)),
Model\DashboardDialogService.cs (1)
104
return
EventCallback
.Factory.Create(receiver, callback);
Model\ResourceMenuBuilder.cs (1)
66
EventCallback
onViewDetails,
Model\SpanMenuBuilder.cs (1)
57
EventCallback
onViewDetails,
Model\StructuredLogMenuBuilder.cs (3)
55
EventCallback
onViewDetails,
71
EventCallback
onViewDetails,
81
EventCallback
onViewDetails,
Aspire.Dashboard.Components.Tests (8)
Controls\ChartFiltersTests.cs (1)
264
builder.Add(p => p.OnDimensionValuesChanged,
EventCallback
.Factory.Create(this, onDimensionValuesChanged));
Controls\ResourceDetailsTests.cs (3)
759
builder.Add(p => p.CommandSelected,
EventCallback
.Factory.Create<CommandViewModel>(this, c => capturedCommand = c));
805
builder.Add(p => p.CommandSelected,
EventCallback
.Factory.Create<CommandViewModel>(this, c => capturedCommand = c));
850
builder.Add(p => p.CommandSelected,
EventCallback
.Factory.Create<CommandViewModel>(this, _ => Task.CompletedTask));
Model\DashboardDialogServiceTests.cs (2)
90
OnDialogClosing =
EventCallback
.Factory.Create<IDialogInstance>(this, async _ =>
95
OnDialogResult =
EventCallback
.Factory.Create<DialogResult>(this, async _ =>
Pages\ResourcesTests.cs (2)
178
builder.Add(component => component.CommandSelected,
EventCallback
.Factory.Create<CommandViewModel>(this, _ => Task.CompletedTask));
180
builder.Add(component => component.OnViewDetails,
EventCallback
.Factory.Create<string?>(this, _ => Task.CompletedTask));
Aspire.Dashboard.Tests (9)
Model\ResourceMenuBuilderTests.cs (9)
98
EventCallback
.Empty,
149
EventCallback
.Empty,
200
EventCallback
.Empty,
237
EventCallback
.Empty,
271
EventCallback
.Empty,
318
EventCallback
.Empty,
357
EventCallback
.Empty,
399
EventCallback
.Empty,
441
EventCallback
.Empty,
Microsoft.AspNetCore.Components (51)
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);
EventCallback.cs (4)
19
/// Gets an empty <see cref="
EventCallback
"/>.
21
public static readonly
EventCallback
Empty = new EventCallback(null, (Action)(() => { }));
27
/// Creates the new <see cref="
EventCallback
"/>.
81
=> obj is
EventCallback
other
EventCallbackFactory.cs (27)
9
/// A factory for creating <see cref="
EventCallback
"/> and <see cref="EventCallback{T}"/>
21
public
EventCallback
Create(object receiver,
EventCallback
callback)
29
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
34
/// <returns>The <see cref="
EventCallback
"/>.</returns>
35
public
EventCallback
Create(object receiver, Action callback)
43
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
48
/// <returns>The <see cref="
EventCallback
"/>.</returns>
49
public
EventCallback
Create(object receiver, Action<object> callback)
57
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
62
/// <returns>The <see cref="
EventCallback
"/>.</returns>
63
public
EventCallback
Create(object receiver, Func<Task> callback)
71
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
76
/// <returns>The <see cref="
EventCallback
"/>.</returns>
77
public
EventCallback
Create(object receiver, Func<object, Task> callback)
91
public EventCallback<TValue> Create<TValue>(object receiver,
EventCallback
callback)
113
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
118
/// <returns>The <see cref="
EventCallback
"/>.</returns>
127
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
132
/// <returns>The <see cref="
EventCallback
"/>.</returns>
141
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
146
/// <returns>The <see cref="
EventCallback
"/>.</returns>
155
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
160
/// <returns>The <see cref="
EventCallback
"/>.</returns>
169
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
183
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
196
private static
EventCallback
CreateCore(object receiver, MulticastDelegate callback)
EventCallbackFactoryBinderExtensions.cs (1)
11
/// Contains extension methods for two-way binding using <see cref="
EventCallback
"/>. For internal use only.
EventCallbackFactoryEventArgsExtensions.cs (8)
12
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
18
/// <returns>The <see cref="
EventCallback
"/>.</returns>
27
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
33
/// <returns>The <see cref="
EventCallback
"/>.</returns>
42
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
48
/// <returns>The <see cref="
EventCallback
"/>.</returns>
57
/// Creates an <see cref="
EventCallback
"/> for the provided <paramref name="receiver"/> and
63
/// <returns>The <see cref="
EventCallback
"/>.</returns>
EventCallbackOfT.cs (1)
65
internal
EventCallback
AsUntyped()
Rendering\RenderTreeBuilder.cs (3)
263
/// Appends a frame representing an <see cref="
EventCallback
"/> attribute.
277
public void AddAttribute(int sequence, string name,
EventCallback
value)
307
/// Appends a frame representing an <see cref="
EventCallback
"/> attribute.
RenderTree\Renderer.cs (3)
38
private readonly Dictionary<ulong, (int RenderedByComponentId,
EventCallback
Callback, string? attributeName)> _eventBindings = new();
722
if (frame.AttributeValueField is
EventCallback
callback)
782
private (int RenderedByComponentId,
EventCallback
Callback, string? attributeName) GetRequiredEventBindingEntry(ulong eventHandlerId)
RenderTree\RenderTreeDiffBuilder.cs (1)
1017
if ((newFrame.AttributeValueField is MulticastDelegate || newFrame.AttributeValueField is
EventCallback
) &&
Microsoft.AspNetCore.Components.AI (4)
Components\MessageInput.cs (3)
98
EventCallback
.Factory.Create<ChangeEventArgs>(
109
EventCallback
.Factory.Create<KeyboardEventArgs>(this, OnKeyDown));
126
EventCallback
.Factory.Create(this, SubmitAsync));
Components\MessageList.cs (1)
171
EventCallback
.Factory.Create(this,
Microsoft.AspNetCore.Components.Endpoints (1)
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (1)
385
if (value is
EventCallback
)
Microsoft.AspNetCore.Components.Media (4)
FileDownload.cs (4)
54
context.Initialize(r => Element = r,
EventCallback
.Factory.Create(this, OnClickAsync));
74
builder.AddAttribute(4, "onclick",
EventCallback
.Factory.Create(this, OnClickAsync));
160
private
EventCallback
_onClick;
161
internal void Initialize(Action<ElementReference> capture,
EventCallback
onClick)
Microsoft.AspNetCore.Components.QuickGrid (12)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\ColumnBase_razor.g.cs (3)
120
__builder.AddAttribute(5, "onclick", global::Microsoft.AspNetCore.Components.
EventCallback
.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
199
__builder.AddAttribute(19, "onclick", global::Microsoft.AspNetCore.Components.
EventCallback
.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
307
__builder.AddAttribute(44, "onclick", global::Microsoft.AspNetCore.Components.
EventCallback
.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Paginator_razor.g.cs (4)
319
__builder.AddAttribute(69, "onclick", global::Microsoft.AspNetCore.Components.
EventCallback
.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
345
__builder.AddAttribute(78, "onclick", global::Microsoft.AspNetCore.Components.
EventCallback
.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
400
__builder.AddAttribute(99, "onclick", global::Microsoft.AspNetCore.Components.
EventCallback
.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
426
__builder.AddAttribute(108, "onclick", global::Microsoft.AspNetCore.Components.
EventCallback
.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\QuickGrid_razor.g.cs (3)
170
__builder3.AddAttribute(13, "onclosecolumnoptions", global::Microsoft.AspNetCore.Components.
EventCallback
.Factory.Create<global::System.EventArgs>(this,
499
var rowClick = OnRowClick.HasDelegate ?
EventCallback
.Factory.Create<MouseEventArgs>(this, () => OnRowClick.InvokeAsync(item)) : default;
525
__builder.AddAttribute(44, "onclick", global::Microsoft.AspNetCore.Components.
EventCallback
.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
QuickGrid.razor.cs (2)
240
_currentPageItemsChanged = new(
EventCallback
.Factory.Create<PaginationState>(this, RefreshDataCoreAsync));
253
EventCallback
.Factory.Create<object?>(this, RefreshDataCoreAsync));
Microsoft.AspNetCore.Components.Server (1)
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (1)
385
if (value is
EventCallback
)
Microsoft.AspNetCore.Components.Web (11)
Forms\InputCheckbox.cs (1)
46
builder.AddAttribute(8, "onchange",
EventCallback
.Factory.CreateBinder<bool>(this, __value => CurrentValue = __value, CurrentValue));
Forms\InputDate.cs (1)
93
builder.AddAttribute(7, "onchange",
EventCallback
.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Forms\InputHidden.cs (1)
32
builder.AddAttribute(7, "onchange",
EventCallback
.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Forms\InputNumber.cs (1)
62
builder.AddAttribute(8, "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)
51
builder.AddAttribute(7, "onchange",
EventCallback
.Factory.CreateBinder<string?[]?>(this, SetCurrentValueAsStringArray, default));
57
builder.AddAttribute(9, "onchange",
EventCallback
.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, default));
Forms\InputText.cs (1)
40
builder.AddAttribute(6, "onchange",
EventCallback
.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
Forms\InputTextArea.cs (1)
40
builder.AddAttribute(6, "onchange",
EventCallback
.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
JSComponents\JSComponentInterop.cs (2)
178
var x when x == typeof(
EventCallback
) => ParameterKind.EventCallbackWithNoParameters,
183
private static
EventCallback
CreateEventCallbackWithNoParameters(IJSObjectReference? jsObjectReference)
Microsoft.AspNetCore.Components.WebAssembly (1)
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (1)
385
if (value is
EventCallback
)