Esempio n. 1
0
        public static List <int> GetVariantSlotList(int variantID)
        {
            var slots = new List <int>();

            try
            {
                using (_certonaService = new CertonaServiceClient())
                {
                    try
                    {
                        UserDTO user    = FormsAuthenticationWrapper.User;
                        var     request = new GetVariantSlotsRequest()
                        {
                            User = user, VariantID = variantID
                        };
                        var response = _certonaService.GetVariantSlots(request);

                        if (response.Success && response.Slots != null)
                        {
                            slots.AddRange(response.Slots);
                        }
                    }
                    catch (TimeoutException exception)
                    {
                        _certonaService.Abort();
                        throw;
                    }
                    catch (CommunicationException exception)
                    {
                        _certonaService.Abort();
                        throw;
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }

            return(slots);
        }