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


C# NSError.ToString方法代码示例

本文整理汇总了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 ();
				});
			}
		}
开发者ID:BoogieMAN2K,项目名称:monotouch-samples,代码行数:37,代码来源:CalendarListController.cs

示例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
 }
开发者ID:jioe,项目名称:appverse-mobile,代码行数:9,代码来源:IPhoneGeo.cs

示例3: ShowError

		public void ShowError (NSError error)
		{
			InvokeOnMainThread (() => {
				using (var alertView = new UIAlertView (error.LocalizedDescription, error.ToString (), null, "OK", null))
					alertView.Show ();
			});
		}
开发者ID:BoogieMAN2K,项目名称:monotouch-samples,代码行数:7,代码来源:RosyWriterVideoProcessor.cs

示例4: FailedToRegisterForRemoteNotifications

 public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
 {
     Debug.WriteLine("FailedToRegisterForRemoteNotifications ->" + error.ToString());
 }
开发者ID:geekpivot,项目名称:HealthClinic.biz,代码行数:4,代码来源:AppDelegate.cs

示例5: LoadFailed

 public override void LoadFailed(UIWebView webView, NSError error)
 {
     System.Diagnostics.Debug.WriteLine("Browser LoadFailed() : " + error.ToString());
 }
开发者ID:reinforce-lab,项目名称:CSharpSamples,代码行数:4,代码来源:UAFakeBrowerController.xib.cs

示例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 ();
        }
开发者ID:dan-pennyfarthingapps,项目名称:one-rm-log,代码行数:10,代码来源:RMShare.cs

示例7: Failed

			public override void Failed(NSError error)
			{
				tcs.TrySetResult (new Tuple<ChargeDetails, string> (null, error.ToString()));
			}
开发者ID:nagyist,项目名称:iPadPos,代码行数:4,代码来源:PayAnywhereProcessor.cs

示例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 ();
            }
        }
开发者ID:ruiamorimwDev,项目名称:skobbler-mono-bindings,代码行数:21,代码来源:NetworkUrlSession.cs

示例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()));
 }
开发者ID:builttoroam,项目名称:BuildIt,代码行数:10,代码来源:BotClientAppDelegateBase.cs

示例10: NSUrlEventArgs

		public NSUrlEventArgs (NSError error)
		{
			Error = string.Format ("NSUrlError: {0}; Description: {1}", error.ToString (), error.Description);
		}
开发者ID:Fedorm,项目名称:core-master,代码行数:4,代码来源:NSUrlEventArgs.cs

示例11: MobileAppTrackerDidFail

 public override void MobileAppTrackerDidFail(MobileAppTracker tracker, NSError error)
 {
     Console.WriteLine ("MAT DidFail: " + error.ToString());
 }
开发者ID:netalex,项目名称:sdk-plugins,代码行数:4,代码来源:MATTestViewController.cs

示例12: Failed

			public override void Failed (CLLocationManager manager, NSError error)
			{
				Util.LogException("MyCLLocationManagerDelegate Failed", new Exception(error.ToString()));
			
				if (callback != null)
					callback (null);
			}			
开发者ID:21Off,项目名称:21Off,代码行数:7,代码来源:Util.cs

示例13: Dialog

 public override void Dialog(FBDialog dialog, NSError error)
 {
     Console.WriteLine("Error: " + error.ToString());
 }
开发者ID:follesoe,项目名称:FacebookBigProfile,代码行数:4,代码来源:FacebookController.cs

示例14: ShowError

 public void ShowError(NSError error)
 {
     Console.WriteLine("Error: " + error.ToString());
 }
开发者ID:follesoe,项目名称:FacebookBigProfile,代码行数:4,代码来源:MainView.xib.cs

示例15: FailedToRegisterForRemoteNotifications

		public static void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
		{
			Logger.Instance.LogWarning("Failed to register for remote notifications: {0}", error.ToString());
		}
开发者ID:Donky-Network,项目名称:DonkySDK-Xamarin-Modular,代码行数:4,代码来源:DonkyiOS.cs


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