Esempio n. 1
0
 public static EPGSearch FromXML(string theXML)
 {
     EPGSearch newSearch = new EPGSearch();
     XmlSerializer serializer = new XmlSerializer(newSearch.GetType());
     StringReader sr = new StringReader(theXML);
     try
     {
         return (EPGSearch)serializer.Deserialize(sr);
     }
     catch
     {
         return null;
     }
 }
Esempio n. 2
0
        public static EPGSearch FromXML(string theXML)
        {
            EPGSearch     newSearch  = new EPGSearch();
            XmlSerializer serializer = new XmlSerializer(newSearch.GetType());
            StringReader  sr         = new StringReader(theXML);

            try
            {
                return((EPGSearch)serializer.Deserialize(sr));
            }
            catch
            {
                return(null);
            }
        }
Esempio n. 3
0
        public static string TVProgrammesMatchingSearch(EPGSearch theSearch)
        {
            List<TVProgramme> matchedProgs = null;
            bool wereTruncated = false;
            //if (theSearch.LimitToDateRange)  TODO
            //    matchedProgs = EPGManager.mcData.SearchTVProgrammesByDateRange(theSearch.DateRange, theSearch.TextToSearch, theSearch.TextType, theSearch.MatchType, out wereTruncated);
            //else
                matchedProgs = EPGManager.SearchTVProgrammes(theSearch.TextToSearch, theSearch.TextType, theSearch.MatchType, out wereTruncated);

            return XMLHelper.Serialize<List<TVProgramme>>(matchedProgs);
        }