/// <summary> /// Requests a new ETP session. /// </summary> public void RequestSession() { Model.RequestedProtocols.Clear(); Model.RequestedProtocols.AddRange(EtpProtocols.Where(x => x.IsSelected)); Parent.OnConnectionChanged(); CanRequestSession = false; }
/// <summary> /// Requests a new ETP session. /// </summary> public void StartServer() { Model.RequestedProtocols.Clear(); Model.RequestedProtocols.AddRange(EtpProtocols.Where(x => x.IsSelected)); Parent.InitEtpServer(); CanRequestSession = false; CanStartServer = !Parent.SelfHostedWebServer?.IsRunning ?? true; CanStopServer = !CanStartServer; }
private async Task OnConnectionChanged(Connection connection) { Model.Connection = connection; Model.Connection.SetServerCertificateValidation(); await Parent.OnConnectionChanged(false); CanStartServer = !Parent.SelfHostedWebServer?.IsRunning ?? true; CanStopServer = !CanStartServer; CanRequestSession = !CanStopServer; CanCloseSession = false; var protocols = Parent.EtpExtender ?? connection.CreateEtpExtender(); await Runtime.InvokeAsync(() => { EtpProtocols.Clear(); EtpProtocols.AddRange(protocols.GetProtocolItems()); }); }