本文整理汇总了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();
}
示例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();
}
示例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;
}
示例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 ();
}
示例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 ();
}