예제 #1
0
 private void RemoveVideoGameTitles(ref IIMDbMovieCollection list)
 {
     try
     {
         if (list != null)
             for (int i = list.Count - 1; i >= 0; i--)
             {
                 if (list[i].Year.ToLower().Trim().IndexOf("vg") > -1)
                     list.RemoveAt(i);
             }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        private static void RemoveVideoGameTitles(ref IIMDbMovieCollection list)
        {
            try
            {
                if (list == null)
                    return;
                
                for (var i = list.Count - 1; i >= 0; i--)
                {
                    if (list[i].Year.ToLower().Trim().IndexOf("vg", System.StringComparison.Ordinal) > -1)
                        list.RemoveAt(i);
                }

            }
            catch (Exception ex)
            {
                Helpers.UpdateProgress("Updating Movies Section...",
                                       "An error occured. Please refer to Debug.log for details.", null);
                Debugger.LogMessageToFile(
                    "[IMDb Film Title Matching Engine] An unexpected error occured while trying to find and remove IMDb video game titles. The error was: " +
                    ex);
            }
        }