private async Task InitTermAsync(TermInitEventArgs e) { var rpc = await this.rpc.GetValueAsync(); if (!this.isRpcDisconnected) { var path = this.options.ShellPath ?? (this.package.OptionTerminal == DefaultTerminal.Other ? this.package.OptionShellPath : this.package.OptionTerminal.ToString()); var args = ((object)this.options.Args) ?? this.package.OptionStartupArgument; await rpc.InvokeAsync("initTerm", path, e.Cols, e.Rows, e.Directory, args, this.options.Environment); } }
internal protected override void OnTerminalInit(object sender, TermInitEventArgs e) { base.OnTerminalInit(sender, e); InitTermAsync(e).FileAndForget("WhackWhackTerminal/InitPty"); }
internal protected virtual void OnTerminalInit(object sender, TermInitEventArgs e) => TerminalInit?.Invoke(this, e);