Exemple #1
0
        private bool ParseServerEventsFromServerEventsDTO(List <ServerEventsDTO> serverEventsDTO, out List <ServerEvents> serverEvents)
        {
            serverEvents = new List <ServerEvents>();
            int i = 0;

            while (i < serverEventsDTO.Count)
            {
                try
                {
                    ServerEvents serverEvent = (ServerEvents)serverEventsDTO[i].Id;
                    if (serverEvent.ToString().ToUpper() != serverEventsDTO[i].Name.ToUpper())
                    {
                        return(false);
                    }
                    serverEvents.Add(serverEvent);
                }
                catch (Exception)
                {
                    return(false);
                }
                i++;
            }

            return(true);
        }