Example #1
0
        public static List <ComicVineVolume> GetVolumeQueryResponse(SearchType searchType, string data)
        {
            if (searchType == null)
            {
                throw new ArgumentNullException("searchType");
            }

            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            List <ComicVineVolume> comicVineVolumeList = null;

            if (searchType == SearchType.Xml)
            {
                comicVineVolumeList = XmlReadVolumeQuery.GetVolumeQueryResponse(data);
            }
            else
            {
                comicVineVolumeList = JsonReadVolumeQuery.GetVolumeQueryResponse(data);
            }

            return(comicVineVolumeList);
        }
Example #2
0
        public static ComicVineVolume GetVolume(SearchType searchType, string data)
        {
            if (searchType == null)
            {
                throw new ArgumentNullException("searchType");
            }

            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            ComicVineVolume detailedComicVineVolume = new ComicVineVolume();

            if (searchType == SearchType.Xml)
            {
                detailedComicVineVolume = XmlReadVolumeQuery.GetVolume(data);
            }
            else
            {
                detailedComicVineVolume = JsonReadVolumeQuery.GetVolume(data);
            }

            return(detailedComicVineVolume);
        }
Example #3
0
        public static ComicVineResponseData GetFirstVolumeQueryResponse(SearchType searchType, string data)
        {
            if (searchType == null)
            {
                throw new ArgumentNullException("searchType");
            }

            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            ComicVineResponseData comicVineResponseData = null;

            if (searchType == SearchType.Xml)
            {
                comicVineResponseData = XmlReadVolumeQuery.GetFirstVolumeQueryResponse(data);
            }
            else
            {
                comicVineResponseData = JsonReadVolumeQuery.GetFirstVolumeQueryResponse(data);
            }

            return(comicVineResponseData);
        }