Exemplo n.º 1
0
        public List <BookRecDTO> FetchBookData(string resourceName, bool useSampleData)
        {
            // Use the default value if no value was provided and
            // remove the .xml extension if included.
            resourceName = NormalizeResourceName(resourceName);

            // Open the XML Data Stream for reading.
            Stream stream = GetXmlDataStream(resourceName, useSampleData);

            // Create an asynchronous task that will...
            // parse the XML data file into a list of BookRecDTO objects.
            CatalogReader     catReader = new CatalogReader();
            List <BookRecDTO> result    = catReader.FetchBookData(stream);

            return(result);
        }