Пример #1
0
        public Form1()
        {
            InitializeComponent();

            _hubConnection         = new HubConnectionBuilder().WithUrl("https://localhost:44394/hub").Build();
            _hubConnection.Closed += async(error) =>
            {
                await Task.Delay(new Random().Next(0, 5) * 1000);

                await _hubConnection.StartAsync();
            };
            _signalR = new SignalR(_hubConnection);
            _api     = new API();

            ghost.DisableTimer();

            invoker = new Invoker();
        }