Beispiel #1
0
        static void ListAll_UseSDK()
        {
            ISDKClient client = Demo.SDK.Client.Create(new Uri("http://demoapiweb20161103110849.azurewebsites.net/"));

            // ISDKClient client = Demo.SDK.Client.Create(new Uri("http://localhost:56648"));
            foreach (var item in (from x in client.GetBirdInfos() where x.BirdNo == "40250" select x))
            {
                ShowBirdInfo(item);
                break;
            }
        }
Beispiel #2
0
        static void TestLinqQuery()
        {
            ISDKClient client = Client.Create(new Uri(apiurl));

            string[] results = (from x in client.GetBirdInfos() where x.Location == "中橫沿線,塔塔加" orderby x.BirdNo ascending select x.BirdNo).ToArray <string>();


            Assert.AreEqual <int>(results.Length, 85);
            Assert.AreEqual <string>(results[0], "39739");
            Assert.AreEqual <string>(results[5], "39744");
            Assert.AreEqual <string>(results[35], "39774");
            Assert.AreEqual <string>(results[84], "39823");


/*
 * 39739
 * 39740
 * 39741
 * 39742
 * 39743
 * 39744
 * 39745
 * 39746
 * 39747
 * 39748
 * 39749
 * 39750
 * 39751
 * 39752
 * 39753
 * 39754
 * 39755
 * 39756
 * 39757
 * 39758
 * 39759
 * 39760
 * 39761
 * 39762
 * 39763
 * 39764
 * 39765
 * 39766
 * 39767
 * 39768
 * 39769
 * 39770
 * 39771
 * 39772
 * 39773
 * 39774
 * 39775
 * 39776
 * 39777
 * 39778
 * 39779
 * 39780
 * 39781
 * 39782
 * 39783
 * 39784
 * 39785
 * 39786
 * 39787
 * 39788
 * 39789
 * 39790
 * 39791
 * 39792
 * 39793
 * 39794
 * 39795
 * 39796
 * 39797
 * 39798
 * 39799
 * 39800
 * 39801
 * 39802
 * 39803
 * 39804
 * 39805
 * 39806
 * 39807
 * 39808
 * 39809
 * 39810
 * 39811
 * 39812
 * 39813
 * 39814
 * 39815
 * 39816
 * 39817
 * 39818
 * 39819
 * 39820
 * 39821
 * 39822
 * 39823
 */
        }