Пример #1
0
        private async Task <bool> AuthenticateAsync(string hostName, string webServiceURL)
        {
            using (var authHandler = new AuthHandler(webServiceURL))
            {
                var result = await authHandler.RegisterDeviceAsync(hostName);

                if (!result.HasObjectError)
                {
                    return(true);
                }

                _deviceToken = result.ObjectValue;

                Console.WriteLine($"Error occurred registering: {result.ObjectException} | {result.ObjectExceptionInformation}");

                return(false);
            }
        }