@@ -13,20 +13,6 @@ namespace KristofferStrube.Blazor.WebAudio;
13
13
[ IJSWrapperConverter ]
14
14
public class PannerNode : AudioNode , IJSCreatable < PannerNode >
15
15
{
16
- /// <summary>
17
- /// Creates an <see cref="PannerNode"/> using the standard constructor.
18
- /// </summary>
19
- /// <param name="jSRuntime">An <see cref="IJSRuntime"/> instance.</param>
20
- /// <param name="context">The <see cref="BaseAudioContext"/> this new <see cref="PannerNode"/> will be associated with.</param>
21
- /// <param name="options">Optional initial parameter value for this <see cref="PannerNode"/>.</param>
22
- /// <returns>A new instance of an <see cref="PannerNode"/>.</returns>
23
- public static async Task < PannerNode > CreateAsync ( IJSRuntime jSRuntime , BaseAudioContext context , PannerOptions ? options = null )
24
- {
25
- IJSObjectReference helper = await jSRuntime . GetHelperAsync ( ) ;
26
- IJSObjectReference jSInstance = await helper . InvokeAsync < IJSObjectReference > ( "constructPannerNode" , context , options ) ;
27
- return new PannerNode ( jSRuntime , jSInstance , new ( ) { DisposesJSReference = true } ) ;
28
- }
29
-
30
16
/// <inheritdoc/>
31
17
public static new async Task < PannerNode > CreateAsync ( IJSRuntime jSRuntime , IJSObjectReference jSReference )
32
18
{
@@ -39,6 +25,20 @@ public static async Task<PannerNode> CreateAsync(IJSRuntime jSRuntime, BaseAudio
39
25
return Task . FromResult ( new PannerNode ( jSRuntime , jSReference , options ) ) ;
40
26
}
41
27
28
+ /// <summary>
29
+ /// Creates an <see cref="PannerNode"/> using the standard constructor.
30
+ /// </summary>
31
+ /// <param name="jSRuntime">An <see cref="IJSRuntime"/> instance.</param>
32
+ /// <param name="context">The <see cref="BaseAudioContext"/> this new <see cref="PannerNode"/> will be associated with.</param>
33
+ /// <param name="options">Optional initial parameter value for this <see cref="PannerNode"/>.</param>
34
+ /// <returns>A new instance of an <see cref="PannerNode"/>.</returns>
35
+ public static async Task < PannerNode > CreateAsync ( IJSRuntime jSRuntime , BaseAudioContext context , PannerOptions ? options = null )
36
+ {
37
+ await using ErrorHandlingJSObjectReference errorHandlingHelper = await jSRuntime . GetErrorHandlingHelperAsync ( ) ;
38
+ IJSObjectReference jSInstance = await errorHandlingHelper . InvokeAsync < IJSObjectReference > ( "constructPannerNode" , context , options ) ;
39
+ return new PannerNode ( jSRuntime , jSInstance , new ( ) { DisposesJSReference = true } ) ;
40
+ }
41
+
42
42
/// <inheritdoc cref="CreateAsync(IJSRuntime, IJSObjectReference, CreationOptions)"/>
43
43
protected PannerNode ( IJSRuntime jSRuntime , IJSObjectReference jSReference , CreationOptions options ) : base ( jSRuntime , jSReference , options )
44
44
{
0 commit comments