public async Task Initialize()
        {
            User = await _localStorageService.GetItem <User>("user");

            if (User != null)
            {
                await _orderService.UpdMyActiveOrder();

                // Initialize web sockets connection
                await _webSocketService.InitializeWebSocketsAsync(User.Id);
            }
        }
예제 #2
0
        public async Task Initialize()
        {
            User = await _localStorageService.GetItem <User>("user");

            // Initialize web sockets connection
            if (User != null)
            {
                await _orderService.UpdMyActiveOrder();

                await _webSocketService.InitializeWebSocketsAsync(User.Id);

                // Order foundActiveOrder = await _orderService.GetActiveOrder();
                // Console.WriteLine($"foundActiveOrder: {JsonConvert.SerializeObject(foundActiveOrder)}");
            }
        }