Skip to content
代码片段 群组 项目
提交 edf5abed 编辑于 作者: Ryan Nowak's avatar Ryan Nowak
浏览文件

Remove unwanted EventCallbackFactory overload

上级 616f15a7
No related branches found
No related tags found
无相关合并请求
......@@ -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()
{
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册