Table of Contents

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

bool

AutoInvokeInit

获得/设置 是否自动调用 init 默认 true

protected bool AutoInvokeInit { get; set; }

Property Value

bool

Interop

获得/设置 DotNetObjectReference 实例

protected DotNetObjectReference<BootstrapModuleComponentBase>? Interop { get; set; }

Property Value

DotNetObjectReference<BootstrapModuleComponentBase>

Module

Instance of JSModule

protected JSModule? Module { get; set; }

Property Value

JSModule

ModulePath

获得/设置 脚本路径

protected string? ModulePath { get; set; }

Property Value

string

Methods

DisposeAsync()

public ValueTask DisposeAsync()

Returns

ValueTask

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

ValueTask

InvokeAsync<TValue>(string, params object?[]?)

call JavaScript method

protected Task<TValue?> InvokeAsync<TValue>(string identifier, params object?[]? args)

Parameters

identifier string
args object[]

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 string
cancellationToken CancellationToken
args 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

identifier string
timeout TimeSpan
args object[]

Returns

Task<TValue>

Type Parameters

TValue

InvokeInitAsync()

call JavaScript method

protected virtual Task InvokeInitAsync()

Returns

Task

InvokeVoidAsync(string, params object?[]?)

call JavaScript method

protected Task InvokeVoidAsync(string identifier, params object?[]? args)

Parameters

identifier string
args object[]

Returns

Task

InvokeVoidAsync(string, CancellationToken, params object?[]?)

call JavaScript method

protected Task InvokeVoidAsync(string identifier, CancellationToken cancellationToken = default, params object?[]? args)

Parameters

identifier string
cancellationToken CancellationToken
args object[]

Returns

Task

InvokeVoidAsync(string, TimeSpan, params object?[]?)

call JavaScript method

protected Task InvokeVoidAsync(string identifier, TimeSpan timeout, params object?[]? args)

Parameters

identifier string
timeout TimeSpan
args object[]

Returns

Task

OnAfterRenderAsync(bool)

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task

OnInitialized()

protected override void OnInitialized()

OnLoadJSModule()

加载 JS Module 方法

protected virtual void OnLoadJSModule()