Пример #1
0
        /// <Summary> Method to check whether or not the treasure hunt to be saved already exists in the database.  </Summary>
        public bool DoesHuntAlreadyExist()
        {
            List <hunt> listOfUserHunts = serviceClient.GetTreasureHuntsForParticularUserAsync(currentUser).Result.ToList();

            using (var currentHunts = listOfUserHunts.GetEnumerator())
            {
                while (currentHunts.MoveNext())
                {
                    //-http://stackoverflow.com/questions/6371150/comparing-two-strings-ignoring-case-in-c-sharp
                    if (String.Equals(currentHunts.Current.HuntName, this.huntName, StringComparison.OrdinalIgnoreCase))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }