当前位置: 首页>>代码示例>>C#>>正文


C# NSUrlConnection.Start方法代码示例

本文整理汇总了C#中NSUrlConnection.Start方法的典型用法代码示例。如果您正苦于以下问题:C# NSUrlConnection.Start方法的具体用法?C# NSUrlConnection.Start怎么用?C# NSUrlConnection.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NSUrlConnection的用法示例。


在下文中一共展示了NSUrlConnection.Start方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DownloadUsingNSUrlRequest

		void DownloadUsingNSUrlRequest (object sender, EventArgs e)
		{
			var downloadedDelegate = new CustomDelegate(this);

			var req = new NSUrlRequest(new NSUrl("http://ch3cooh.hatenablog.jp/"));
			NSUrlConnection connection = new NSUrlConnection(req, downloadedDelegate);
			connection.Start();
		} 
开发者ID:CH3COOH,项目名称:Softbuild.XamarinIOSSamples,代码行数:8,代码来源:WebRequestSampleViewController.cs

示例2: ShowUrl

		void ShowUrl ()
		{
			// Show the hud on top most view
			hud = MTMBProgressHUD.ShowHUD(this.navController.View, true);
			
			// Regiser for DidHide Event so we can remove it from the window at the right time
			hud.DidHide += HandleDidHide;

			NSUrl url = new NSUrl("https://github.com/matej/MBProgressHUD/zipball/master");
			NSUrlRequest request = new NSUrlRequest(url);

			NSUrlConnection connection = new NSUrlConnection(request, new MyNSUrlConnectionDelegete(this, hud));
			connection.Start();
		}
开发者ID:JonathanTLH,项目名称:PanTiltZoomSystem,代码行数:14,代码来源:AppDelegate.cs

示例3: RxTermViaNSURLConnectionAsync

        private static RxTerm RxTermViaNSURLConnectionAsync(string rxcui, Action<RxTerm> callback = null)
        {
            var rxTerm = new RxTerm();

            try {
                var request = new NSMutableUrlRequest(new NSUrl(string.Format("http://rxnav.nlm.nih.gov/REST/RxTerms/rxcui/{0}/allinfo", rxcui)),
                NSUrlRequestCachePolicy.ReloadRevalidatingCacheData, 20);
                request["Accept"] = "application/json";

                var connectionDelegate = new RxTermNSURLConnectionDelegate();
                var connection = new NSUrlConnection(request, connectionDelegate);
                connection.Start();

            } catch (Exception ex) {
                Console.WriteLine("Problem getting data for concept: {0} -- Exception: {1}", rxcui, ex.Message + ex.StackTrace);
            }

            return rxTerm;
        }
开发者ID:CodeSensei,项目名称:mobile-samples,代码行数:19,代码来源:RxTermRestClient.cs

示例4: Search7

 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 ();
 }
开发者ID:enricos,项目名称:learning_monotouch_code,代码行数:9,代码来源:BingServiceGateway.cs

示例5: NSUrlConnectionButtonXamarinExample_TouchUpInside

		partial void NSUrlConnectionButtonXamarinExample_TouchUpInside(UIButton sender)
		{
			string rxcui = "198440";
			NSMutableUrlRequest request = new NSMutableUrlRequest(new NSUrl(string.Format("http://rxnav.nlm.nih.gov/REST/RxTerms/rxcui/{0}/allinfo", rxcui)), 
				NSUrlRequestCachePolicy.ReloadRevalidatingCacheData, 20);
			request["Accept"] = "application/json";

			RxTermNSURLConnectionDelegate connectionDelegate = new RxTermNSURLConnectionDelegate();

			NSUrlConnection aConnection = new NSUrlConnection(request, connectionDelegate);
			aConnection.Start();
		}
开发者ID:AlexBrownShi,项目名称:splunk-sdk-mint-xamarin-ios,代码行数:12,代码来源:SplunkMint-iOS.ClientAppViewController.cs

示例6: SearchCoreFoundation

        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 ();
        }
开发者ID:GSerjo,项目名称:Seminars,代码行数:13,代码来源:Bing.cs


注:本文中的NSUrlConnection.Start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。