From 616f15a73e537defbac1b508ce9739b046d487da Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Mon, 1 Jul 2019 17:34:36 -0700 Subject: [PATCH] Add EventCallback.Empty --- .../ref/Microsoft.AspNetCore.Components.netstandard2.0.cs | 1 + src/Components/Components/src/EventCallback.cs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs index e302e9699b..aeb2ea8b73 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs @@ -205,6 +205,7 @@ namespace Microsoft.AspNetCore.Components public readonly partial struct EventCallback { private readonly object _dummy; + public static readonly Microsoft.AspNetCore.Components.EventCallback Empty; public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; } public bool HasDelegate { get { throw null; } } public System.Threading.Tasks.Task InvokeAsync(T arg) { throw null; } diff --git a/src/Components/Components/src/EventCallback.cs b/src/Components/Components/src/EventCallback.cs index 5a396e306b..0d37124c64 100644 --- a/src/Components/Components/src/EventCallback.cs +++ b/src/Components/Components/src/EventCallback.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Components public static readonly EventCallbackFactory Factory = new EventCallbackFactory(); /// - /// Gets an empty . + /// Gets an empty . /// public static readonly EventCallback Empty = new EventCallback(null, (Action)(() => { })); @@ -72,6 +72,11 @@ namespace Microsoft.AspNetCore.Components /// public readonly struct EventCallback : IEventCallback { + /// + /// Gets an empty . + /// + public static readonly EventCallback Empty = new EventCallback(null, (Action)(() => { })); + internal readonly MulticastDelegate Delegate; internal readonly IHandleEvent Receiver;