本文整理汇总了C#中NSError.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# NSError.ToString方法的具体用法?C# NSError.ToString怎么用?C# NSError.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NSError
的用法示例。
在下文中一共展示了NSError.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PopulateCalendarList
/// <summary>
/// called as the completion handler to requesting access to the calendar
/// </summary>
protected void PopulateCalendarList (bool grantedAccess, NSError e)
{
// if it err'd show it to the user
if ( e != null ) {
Console.WriteLine ( "Err: " + e.ToString () );
new UIAlertView ( "Error", e.ToString(), null, "ok", null ).Show();
return;
}
// if the user granted access to the calendar data
if (grantedAccess) {
// get calendars of the particular type (either events or reminders)
calendars = App.Current.EventStore.GetCalendars ( entityType );
// build out an MT.D list of all the calendars, we show the calendar title
// as well as the source (where the calendar is pulled from, like iCloud, local
// exchange, etc.)
calendarListRoot.Add (
new Section ( ) {
from elements in calendars
select ( Element ) new StringElement ( elements.Title, elements.Source.Title )
}
);
this.InvokeOnMainThread ( () => { this.Root = calendarListRoot; } );
}
// if the user didn't grant access, show an alert
else {
Console.WriteLine ( "Access denied by user. " );
InvokeOnMainThread ( () => {
new UIAlertView ( "No Access", "Access to calendar not granted", null, "ok", null).Show ();
});
}
}
示例2: FailedWithError
/// <summary>
/// Show a message if the MKReverseGeocoder says so
/// </summary>
public override void FailedWithError(MKReverseGeocoder gc, NSError e)
{
SystemLogger.Log (SystemLogger.Module.PLATFORM, e.ToString ());
SystemLogger.Log (SystemLogger.Module.PLATFORM, e.LocalizedDescription);
// PBRequesterErrorDomain error 6001 occurs when too many requests have been sent
}
示例3: ShowError
public void ShowError (NSError error)
{
InvokeOnMainThread (() => {
using (var alertView = new UIAlertView (error.LocalizedDescription, error.ToString (), null, "OK", null))
alertView.Show ();
});
}
示例4: FailedToRegisterForRemoteNotifications
public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
{
Debug.WriteLine("FailedToRegisterForRemoteNotifications ->" + error.ToString());
}
示例5: LoadFailed
public override void LoadFailed(UIWebView webView, NSError error)
{
System.Diagnostics.Debug.WriteLine("Browser LoadFailed() : " + error.ToString());
}
示例6: FailedWithError
public override void FailedWithError(FBRequest request, NSError error)
{
var u = new UIAlertView ("Request Error", "Failed with " + error.ToString (), null, "ok");
u.Dismissed += delegate {
handlers.Remove (this);
};
Console.WriteLine(error.Description.ToString());
u.Show ();
}
示例7: Failed
public override void Failed(NSError error)
{
tcs.TrySetResult (new Tuple<ChargeDetails, string> (null, error.ToString()));
}
示例8: DidCompleteWithError
public virtual void DidCompleteWithError(NSUrlSessionTask task, NSError error)
{
Console.WriteLine ("Completed: {0}", error != null ? error.ToString () : "no error");
this._tasks.Remove (task);
if (error != null) {
this._error = new Exception (error.Domain);
// Cancel other tasks; they are probably GG..
foreach (var t in this._tasks) {
t.Cancel ();
}
this._tasks.Clear();
}
if (this._tasks.Count == 0) {
this.RaiseCompleted ();
}
}
示例9: FailedToRegisterForRemoteNotifications
/// <summary>
///
/// </summary>
/// <param name="application"></param>
/// <param name="error"></param>
public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
{
//base.FailedToRegisterForRemoteNotifications(application, error);
RegistrationFailure?.Invoke(new Exception(error.ToString()));
}
示例10: NSUrlEventArgs
public NSUrlEventArgs (NSError error)
{
Error = string.Format ("NSUrlError: {0}; Description: {1}", error.ToString (), error.Description);
}
示例11: MobileAppTrackerDidFail
public override void MobileAppTrackerDidFail(MobileAppTracker tracker, NSError error)
{
Console.WriteLine ("MAT DidFail: " + error.ToString());
}
示例12: Failed
public override void Failed (CLLocationManager manager, NSError error)
{
Util.LogException("MyCLLocationManagerDelegate Failed", new Exception(error.ToString()));
if (callback != null)
callback (null);
}
示例13: Dialog
public override void Dialog(FBDialog dialog, NSError error)
{
Console.WriteLine("Error: " + error.ToString());
}
示例14: ShowError
public void ShowError(NSError error)
{
Console.WriteLine("Error: " + error.ToString());
}
示例15: FailedToRegisterForRemoteNotifications
public static void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
{
Logger.Instance.LogWarning("Failed to register for remote notifications: {0}", error.ToString());
}