Remove unwanted EventCallbackFactory overload
This commit is contained in:
parent
616f15a73e
commit
edf5abed26
|
|
@ -143,8 +143,6 @@ namespace Microsoft.AspNetCore.Components
|
|||
public Microsoft.AspNetCore.Components.EventCallback<T> Create<T>(object receiver, System.Action<T> callback) { throw null; }
|
||||
public Microsoft.AspNetCore.Components.EventCallback<T> Create<T>(object receiver, System.Func<System.Threading.Tasks.Task> callback) { throw null; }
|
||||
public Microsoft.AspNetCore.Components.EventCallback<T> Create<T>(object receiver, System.Func<T, System.Threading.Tasks.Task> callback) { throw null; }
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public string Create<T>(object receiver, string callback) { throw null; }
|
||||
}
|
||||
public static partial class EventCallbackFactoryBinderExtensions
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,23 +98,6 @@ namespace Microsoft.AspNetCore.Components
|
|||
return CreateCore(receiver, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the provided <paramref name="callback"/>. For internal framework use only.
|
||||
/// </summary>
|
||||
/// <param name="receiver"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <returns></returns>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public string Create<T>(object receiver, string callback)
|
||||
{
|
||||
if (receiver == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(receiver));
|
||||
}
|
||||
|
||||
return callback;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the provided <paramref name="callback"/>. For internal framework use only.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -296,20 +296,6 @@ namespace Microsoft.AspNetCore.Components
|
|||
Assert.True(callback.RequiresExplicitReceiver);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateT_String_ReturnsInput()
|
||||
{
|
||||
// Arrange
|
||||
var component = new EventComponent();
|
||||
var input = "some_js";
|
||||
|
||||
// Act
|
||||
var callback = EventCallback.Factory.Create<UIMouseEventArgs>(component, input);
|
||||
|
||||
// Assert
|
||||
Assert.Same(input, callback);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateT_EventCallback_ReturnsInput()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue