Add EventCallback<T>.Empty
This commit is contained in:
parent
db8f9ce087
commit
616f15a73e
|
|
@ -205,6 +205,7 @@ namespace Microsoft.AspNetCore.Components
|
|||
public readonly partial struct EventCallback<T>
|
||||
{
|
||||
private readonly object _dummy;
|
||||
public static readonly Microsoft.AspNetCore.Components.EventCallback<T> 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; }
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Components
|
|||
public static readonly EventCallbackFactory Factory = new EventCallbackFactory();
|
||||
|
||||
/// <summary>
|
||||
/// Gets an empty <see cref="EventCallback{T}"/>.
|
||||
/// Gets an empty <see cref="EventCallback"/>.
|
||||
/// </summary>
|
||||
public static readonly EventCallback Empty = new EventCallback(null, (Action)(() => { }));
|
||||
|
||||
|
|
@ -72,6 +72,11 @@ namespace Microsoft.AspNetCore.Components
|
|||
/// </summary>
|
||||
public readonly struct EventCallback<T> : IEventCallback
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets an empty <see cref="EventCallback{T}"/>.
|
||||
/// </summary>
|
||||
public static readonly EventCallback<T> Empty = new EventCallback<T>(null, (Action)(() => { }));
|
||||
|
||||
internal readonly MulticastDelegate Delegate;
|
||||
internal readonly IHandleEvent Receiver;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue