Skip to content

Commit b1176c2

Browse files
committed
chore: deprecate IJavaScriptExecutionHandler2 interface
1 parent 36dcf7b commit b1176c2

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/Runtime/Runtime/APP_SUPPORT/Cshtml5Initializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public static void Initialize()
4646
Initialize(new JavaScriptExecutionHandler());
4747
}
4848

49-
[Obsolete(Helper.ObsoleteMemberMessage + " Use DotNetForHtml5.Initialize(IWebAssemblyExecutionHandler) instead.")]
5049
[EditorBrowsable(EditorBrowsableState.Never)]
50+
[Obsolete(Helper.ObsoleteMemberMessage + " Use DotNetForHtml5.Initialize(IWebAssemblyExecutionHandler) instead.", true)]
5151
public static void Initialize(IJavaScriptExecutionHandler2 executionHandler)
5252
{
5353
Initialize((IJavaScriptExecutionHandler)executionHandler);

src/Runtime/Runtime/__SPECIFIC__/IJavaScriptExecutionHandler.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public interface IWebAssemblyExecutionHandler : IJavaScriptExecutionHandler
3333
TResult InvokeUnmarshalled<T0, T1, T2, TResult>(string identifier, T0 arg0, T1 arg1, T2 arg2);
3434
}
3535

36-
[Obsolete(Helper.ObsoleteMemberMessage + " Use DotNetForHtml5.IWebAssemblyExecutionHandler instead.")]
3736
[EditorBrowsable(EditorBrowsableState.Never)]
37+
[Obsolete(Helper.ObsoleteMemberMessage + " Use DotNetForHtml5.IWebAssemblyExecutionHandler instead.", true)]
3838
public interface IJavaScriptExecutionHandler2 : IJavaScriptExecutionHandler
3939
{
4040
TResult InvokeUnmarshalled<T0, TResult>(string identifier, T0 arg0);
@@ -56,16 +56,7 @@ public object ExecuteJavaScriptWithResult(string javaScriptToExecute)
5656
=> _jsRuntime.ExecuteJavaScriptWithResult(javaScriptToExecute);
5757

5858
public TResult InvokeUnmarshalled<T0, TResult>(string identifier, T0 arg0)
59-
{
60-
#pragma warning disable CS0618
61-
if (_jsRuntime is IJavaScriptExecutionHandler2 jsRuntime)
62-
#pragma warning restore CS0618
63-
{
64-
jsRuntime.InvokeUnmarshalled<T0, TResult>(identifier, arg0);
65-
}
66-
67-
throw new NotSupportedException();
68-
}
59+
=> throw new NotSupportedException();
6960

7061
public TResult InvokeUnmarshalled<T0, T1, TResult>(string identifier, T0 arg0, T1 arg1)
7162
=> throw new NotSupportedException();

0 commit comments

Comments
 (0)