コード例 #1
0
 /// <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;
 }
コード例 #2
0
 /// <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;
 }
コード例 #3
0
        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());
            });
        }