Exemplo n.º 1
0
        public void SingleQueryTest()
        {
            var filter = new PubMedQueryFilter
             {
                 Skip = 0,
                 Take = 50,
                 Query = QueryGenerator.GetSimpleQuery()
             };

            // Get Query Ids 
            var pubmedRequest = new PubMedRequest(EntrezDatabaseTypes.pubmed);

            // Task1
            var pubMedQueryResult = pubmedRequest.GetPublicationsIds(filter);

            // Task2
            var result = pubmedRequest.GetPublicationSummaries(pubMedQueryResult.PubMedIdCollection);
        }
Exemplo n.º 2
0
        public void UserMakesCalls(int times)
        {
            for (var i = 0; i < times; i++)
            {
                var filter = new PubMedQueryFilter
                {
                    Skip = 0,
                    Take = 50,
                    Query = QueryGenerator.GetSimpleQueryRandomDoctrNames()
                };

                // Get Query Ids 
                var pubmedRequest = new PubMedRequest(EntrezDatabaseTypes.pubmed);

                // Task1
                var pubMedQueryResult = pubmedRequest.GetPublicationsIds(filter);

                // Task2
                var result = pubmedRequest.GetPublicationSummaries(pubMedQueryResult.PubMedIdCollection);

                var Ids = string.Join(", ", pubMedQueryResult.PubMedIdCollection);
                Debug.WriteLine(Ids);
                Debug.WriteLine(result);
            }
        }