public async Task <LoginResponse> LoginAsync(P360LoginData p360LoginData)
        {
            LoginResponse loginResponse = null;

            if (Enum.TryParse <LoginMode>(p360LoginData.LoginMode, out LoginMode loginMode))
            {
                var service = new P360WebReference.ViewStarServiceSoapClient(EndpointConfiguration.ViewStarServiceSoap, p360LoginData.Url);

                await _locker.LockAsync(async() =>
                {
                    loginResponse = await service.LoginAsync(
                        p360LoginData.Username,
                        p360LoginData.Password,
                        p360LoginData.Group,
                        loginMode);
                    // This is a work-around due to P360 issue whereas simultaneous logins to not release licenses
                    await Task.Delay(TimeSpan.FromMilliseconds(_p360ServiceData.CurrentValue.TimeBetweenP360LoginsInMs));
                });
            }

            return(loginResponse);
        }
        public async Task <LogoutResponse> LogoutAsync(SessionTokenHeader sessionTokenHeader, P360LoginData p360LoginData)
        {
            var service = new P360WebReference.ViewStarServiceSoapClient(EndpointConfiguration.ViewStarServiceSoap, p360LoginData.Url);

            return(await service.LogoutAsync(sessionTokenHeader));
        }