diff --git a/Directory.Build.props b/Directory.Build.props
index fb913ff04d..3483c7d692 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -15,6 +15,7 @@
$(MSBuildThisFileDirectory)build\Key.snk
true
Microsoft
+ 7.3
false
diff --git a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/BlazorApi.cs b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/BlazorApi.cs
index 81e1f761b8..f04dd3c203 100644
--- a/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/BlazorApi.cs
+++ b/src/Microsoft.AspNetCore.Blazor.Razor.Extensions/BlazorApi.cs
@@ -84,8 +84,6 @@ namespace Microsoft.AspNetCore.Blazor.Razor
public static readonly string GetEventHandlerValue = "Microsoft.AspNetCore.Blazor.Components.BindMethods.GetEventHandlerValue";
- public static readonly string SetValue = "Microsoft.AspNetCore.Blazor.Components.BindMethods.SetValue";
-
public static readonly string SetValueHandler = "Microsoft.AspNetCore.Blazor.Components.BindMethods.SetValueHandler";
}
@@ -93,10 +91,5 @@ namespace Microsoft.AspNetCore.Blazor.Razor
{
public static readonly string FullTypeName = "Microsoft.AspNetCore.Blazor.Components.EventHandlerAttribute";
}
-
- public static class UIEventHandler
- {
- public static readonly string FullTypeName = "Microsoft.AspNetCore.Blazor.UIEventHandler";
- }
}
}
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/BlazorHosted.CSharp.Client.csproj b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/BlazorHosted.CSharp.Client.csproj
index ba744cd300..a93516e054 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/BlazorHosted.CSharp.Client.csproj
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/BlazorHosted.CSharp.Client.csproj
@@ -8,6 +8,7 @@
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json;
+ 7.3
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/BlazorHosted.CSharp.Server.csproj b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/BlazorHosted.CSharp.Server.csproj
index b726c3620d..d30bddb6e7 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/BlazorHosted.CSharp.Server.csproj
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/BlazorHosted.CSharp.Server.csproj
@@ -7,6 +7,7 @@
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json;
+ 7.3
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/BlazorHosted.CSharp.Shared.csproj b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/BlazorHosted.CSharp.Shared.csproj
index 9f5c4f4abb..2a77f0c7cc 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/BlazorHosted.CSharp.Shared.csproj
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/BlazorHosted.CSharp.Shared.csproj
@@ -2,6 +2,7 @@
netstandard2.0
+ 7.3
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorLibrary.CSharp/BlazorLibrary.CSharp.csproj b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorLibrary.CSharp/BlazorLibrary.CSharp.csproj
index 38fea54a00..a27676ed8b 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorLibrary.CSharp/BlazorLibrary.CSharp.csproj
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorLibrary.CSharp/BlazorLibrary.CSharp.csproj
@@ -10,6 +10,7 @@
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json;
+ 7.3
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/BlazorStandalone.CSharp.csproj b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/BlazorStandalone.CSharp.csproj
index b949e4742c..652d98a810 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/BlazorStandalone.CSharp.csproj
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/BlazorStandalone.CSharp.csproj
@@ -9,6 +9,7 @@
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json;
+ 7.3
diff --git a/src/Microsoft.AspNetCore.Blazor/Components/BindMethods.cs b/src/Microsoft.AspNetCore.Blazor/Components/BindMethods.cs
index c154dc3aac..fddfdcc4f0 100644
--- a/src/Microsoft.AspNetCore.Blazor/Components/BindMethods.cs
+++ b/src/Microsoft.AspNetCore.Blazor/Components/BindMethods.cs
@@ -3,6 +3,7 @@
using System;
using System.Globalization;
+using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Blazor.Components
{
@@ -41,6 +42,15 @@ namespace Microsoft.AspNetCore.Blazor.Components
return value;
}
+ ///
+ /// Not intended to be used directly.
+ ///
+ public static MulticastDelegate GetEventHandlerValue(Func value)
+ where T : UIEventArgs
+ {
+ return value;
+ }
+
///
/// Not intended to be used directly.
///
@@ -53,7 +63,16 @@ namespace Microsoft.AspNetCore.Blazor.Components
///
/// Not intended to be used directly.
///
- public static UIEventHandler SetValueHandler(Action setter, string existingValue)
+ public static MulticastDelegate GetEventHandlerValue(Func value)
+ where T : UIEventArgs
+ {
+ return value;
+ }
+
+ ///
+ /// Not intended to be used directly.
+ ///
+ public static Action SetValueHandler(Action setter, string existingValue)
{
return _ => setter((string)((UIChangeEventArgs)_).Value);
}
@@ -61,7 +80,7 @@ namespace Microsoft.AspNetCore.Blazor.Components
///
/// Not intended to be used directly.
///
- public static UIEventHandler SetValueHandler(Action setter, bool existingValue)
+ public static Action SetValueHandler(Action setter, bool existingValue)
{
return _ => setter((bool)((UIChangeEventArgs)_).Value);
}
@@ -69,7 +88,7 @@ namespace Microsoft.AspNetCore.Blazor.Components
///
/// Not intended to be used directly.
///
- public static UIEventHandler SetValueHandler(Action setter, int existingValue)
+ public static Action SetValueHandler(Action setter, int existingValue)
{
return _ => setter(int.Parse((string)((UIChangeEventArgs)_).Value));
}
@@ -77,23 +96,23 @@ namespace Microsoft.AspNetCore.Blazor.Components
///
/// Not intended to be used directly.
///
- public static UIEventHandler SetValueHandler(Action setter, DateTime existingValue)
+ public static Action SetValueHandler(Action setter, DateTime existingValue)
{
- return _ => SetDateTimeValue(setter, (object)((UIChangeEventArgs)_).Value, null);
+ return _ => SetDateTimeValue(setter, ((UIChangeEventArgs)_).Value, null);
}
///
/// Not intended to be used directly.
///
- public static UIEventHandler SetValueHandler(Action setter, DateTime existingValue, string format)
+ public static Action SetValueHandler(Action setter, DateTime existingValue, string format)
{
- return _ => SetDateTimeValue(setter, (object)((UIChangeEventArgs)_).Value, format);
+ return _ => SetDateTimeValue(setter, ((UIChangeEventArgs)_).Value, format);
}
///
/// Not intended to be used directly.
///
- public static UIEventHandler SetValueHandler(Action setter, T existingValue)
+ public static Action SetValueHandler(Action setter, T existingValue)
{
if (!typeof(T).IsEnum)
{
@@ -108,52 +127,6 @@ namespace Microsoft.AspNetCore.Blazor.Components
};
}
- ///
- /// Not intended to be used directly.
- ///
- public static Action