Class BootstrapModuleComponentBase
- Namespace
- BootstrapBlazor.Components
- Assembly
- BootstrapBlazor.dll
Bootstrap blazor JavaScript isolation base class
public abstract class BootstrapModuleComponentBase : IdComponentBase, IComponent, IHandleAfterRender, IHandleEvent, IAsyncDisposable
- Inheritance
-
BootstrapModuleComponentBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
BootstrapModuleComponentBase()
protected BootstrapModuleComponentBase()
Properties
AutoInvokeDispose
获得/设置 是否自动调用 dispose 默认 true
protected bool AutoInvokeDispose { get; set; }
Property Value
AutoInvokeInit
获得/设置 是否自动调用 init 默认 true
protected bool AutoInvokeInit { get; set; }
Property Value
Interop
获得/设置 DotNetObjectReference 实例
protected DotNetObjectReference<BootstrapModuleComponentBase>? Interop { get; set; }
Property Value
Module
Instance of JSModule
protected JSModule? Module { get; set; }
Property Value
ModulePath
获得/设置 脚本路径
protected string? ModulePath { get; set; }
Property Value
Methods
DisposeAsync()
public ValueTask DisposeAsync()
Returns
DisposeAsync(bool)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
protected virtual ValueTask DisposeAsync(bool disposing)
Parameters
disposing
bool
Returns
InvokeAsync<TValue>(string, params object?[]?)
call JavaScript method
protected Task<TValue?> InvokeAsync<TValue>(string identifier, params object?[]? args)
Parameters
Returns
- Task<TValue>
Type Parameters
TValue
InvokeAsync<TValue>(string, CancellationToken, params object?[]?)
call JavaScript method
protected Task<TValue?> InvokeAsync<TValue>(string identifier, CancellationToken cancellationToken = default, params object?[]? args)
Parameters
identifier
stringcancellationToken
CancellationTokenargs
object[]
Returns
- Task<TValue>
Type Parameters
TValue
InvokeAsync<TValue>(string, TimeSpan, params object?[]?)
call JavaScript method
protected Task<TValue?> InvokeAsync<TValue>(string identifier, TimeSpan timeout, params object?[]? args)
Parameters
Returns
- Task<TValue>
Type Parameters
TValue
InvokeInitAsync()
call JavaScript method
protected virtual Task InvokeInitAsync()
Returns
InvokeVoidAsync(string, params object?[]?)
call JavaScript method
protected Task InvokeVoidAsync(string identifier, params object?[]? args)
Parameters
Returns
InvokeVoidAsync(string, CancellationToken, params object?[]?)
call JavaScript method
protected Task InvokeVoidAsync(string identifier, CancellationToken cancellationToken = default, params object?[]? args)
Parameters
identifier
stringcancellationToken
CancellationTokenargs
object[]
Returns
InvokeVoidAsync(string, TimeSpan, params object?[]?)
call JavaScript method
protected Task InvokeVoidAsync(string identifier, TimeSpan timeout, params object?[]? args)
Parameters
Returns
OnAfterRenderAsync(bool)
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
bool
Returns
OnInitialized()
protected override void OnInitialized()
OnLoadJSModule()
加载 JS Module 方法
protected virtual void OnLoadJSModule()