Class ModuleJsInteropBase
- Namespace
- BlazOrbit.Abstractions
- Assembly
- BlazOrbit.Core.dll
Represents a base class for JavaScript interop modules that implement the IAsyncDisposable interface.
public abstract class ModuleJsInteropBase
- Inheritance
-
objectModuleJsInteropBase
Constructors
ModuleJsInteropBase(IJSRuntime, string)
Initializes a new instance of the ModuleJsInterop class.
public ModuleJsInteropBase(IJSRuntime jsRuntime, string jsModuleContentPath)
Parameters
jsRuntimeIJSRuntimeThe JavaScript runtime.
jsModuleContentPathstringThe path to the JavaScript module content.
Exceptions
- ArgumentNullException
Thrown when jsRuntime is null.
Fields
JsRuntime
Represents an interface for invoking JavaScript code from .NET code.
protected readonly IJSRuntime JsRuntime
Field Value
- IJSRuntime
ModuleTask
A lazy asynchronous task that represents a JavaScript object reference.
protected readonly Lazy<Task<IJSObjectReference>> ModuleTask
Field Value
- Lazy<Task<IJSObjectReference>>
Methods
DisposeAsync()
Asynchronously disposes of the resources used by the module. The following exceptions are swallowed intentionally — all four are raised on non-actionable teardown paths (prerender without a circuit, circuit shutdown, runtime disposal, or cancellation during the awaited module dispose).
public virtual ValueTask DisposeAsync()
Returns
- ValueTask
A System.Threading.Tasks.ValueTask representing the asynchronous operation.