Example #1
0
        public void Search7(string text)
        {
            //BUG: NSUrl creation fails if space in search text TODO: escape input
            string       bingSearch  = String.Format("http://api.bing.net/xml.aspx?AppId={0}&Query={1}&Sources=web&web.count=10", BING_API_ID, text);
            NSUrlRequest bingRequest = new NSUrlRequest(NSUrl.FromString(HttpUtility.UrlPathEncode(bingSearch)));

            _cnDelegate = new BingConnectionDelegate();
            NSUrlConnection cn = new NSUrlConnection(bingRequest, _cnDelegate);

            cn.Start();
        }
Example #2
0
        public void SearchCoreFoundation(string text)
        {
            string bingSearch = String.Format(
                "http://api.bing.net/xml.aspx?AppId={0}&Query={1}&Sources=web&web.count=10",
                BING_API_ID,
                text
                );

            var bingRequest = new NSUrlRequest(NSUrl.FromString(HttpUtility.UrlPathEncode(bingSearch)));

            cnDelegate = new BingConnectionDelegate();
            var cn = new NSUrlConnection(bingRequest, cnDelegate);

            cn.Start();
        }
 public void Search7 (string text)
 {
     //BUG: NSUrl creation fails if space in search text TODO: escape input
     string bingSearch = String.Format ("http://api.bing.net/xml.aspx?AppId={0}&Query={1}&Sources=web&web.count=10", BING_API_ID, text);
     NSUrlRequest bingRequest = new NSUrlRequest (NSUrl.FromString (HttpUtility.UrlPathEncode(bingSearch)));
     _cnDelegate = new BingConnectionDelegate ();
     NSUrlConnection cn = new NSUrlConnection (bingRequest, _cnDelegate);
     cn.Start ();
 }
Example #4
0
        public void SearchCoreFoundation (string text)
        {
            string bingSearch = String.Format (
                "http://api.bing.net/xml.aspx?AppId={0}&Query={1}&Sources=web&web.count=10",
                BING_API_ID,
                text
            );

            var bingRequest = new NSUrlRequest (NSUrl.FromString (HttpUtility.UrlPathEncode (bingSearch)));
            cnDelegate = new BingConnectionDelegate ();
            var cn = new NSUrlConnection (bingRequest, cnDelegate);
            cn.Start ();
        }