protected override async Task OnAfterRenderAsync()
        {
            if (this._isFirstRender)
            {
                if (this.Options == null)
                {
                    this.Options = new TerminalOptions();
                }

                await JSRuntime.InvokeAsync <object>($"{NAMESPACE_PREFIX}.{CREATE_ACTION}", this._divReference, this.Options);

                TerminalManager.RegisterTerminal(this.TerminalId, this);

                if (!string.IsNullOrWhiteSpace(this.HelloMessage))
                {
                    await JSRuntime.InvokeAsync <object>($"{NAMESPACE_PREFIX}.{WRITE_LINE_ACTION}", this._divReference, this.HelloMessage);
                }
                this._isFirstRender = false;
            }
        }
Exemple #2
0
 public void Dispose()
 {
     TerminalManager.UnregisterTerminal(this.TerminalId);
     //JSRuntime.InvokeAsync<object>($"{NAMESPACE_PREFIX}.{DISPOSE_ACTION}", this._divReference).GetAwaiter().GetResult();
 }