ShowWhileAsync() public method

public ShowWhileAsync ( System.Action execute, bool animated ) : Action
execute System.Action
animated bool
return Action
            public override void Selected(DialogViewController controller, UITableView tableView, object item, NSIndexPath indexPath)
            {
                if (ProgressButtonData.IndicatorStyle == IndicatorStyle.Hud)
                {
                    var progress = new ProgressHud()
                    {
                        TitleText       = ProgressButtonData.Title,
                        DetailText      = ProgressButtonData.DetailText,
                        MinimumShowTime = ProgressButtonData.MinimumShowTime,
                        GraceTime       = ProgressButtonData.GraceTime
                    };

                    Action asyncCompleted = null;

                    asyncCompleted = progress.ShowWhileAsync(() =>
                    {
                        if (DataContext != null)
                        {
                            InvokeOnMainThread(() =>
                            {
                                ExecuteMethod(asyncCompleted);
                            });
                        }
                    }, true);
                }
                else
                {
                    base.Selected(controller, tableView, item, indexPath);
                }

                tableView.DeselectRow(indexPath, true);
            }
			public override void Selected(DialogViewController controller, UITableView tableView, object item, NSIndexPath indexPath)
			{
				if (ProgressButtonData.IndicatorStyle == IndicatorStyle.Hud)
				{
					var progress = new ProgressHud() 
					{ 
						TitleText = ProgressButtonData.Title,
						DetailText = ProgressButtonData.DetailText,
						MinimumShowTime = ProgressButtonData.MinimumShowTime,
						GraceTime = ProgressButtonData.GraceTime	
					};
	
					Action asyncCompleted = null;
				
					asyncCompleted = progress.ShowWhileAsync(() =>
					{
						if (DataContext != null)
						{
							InvokeOnMainThread(() =>
							{
								ExecuteMethod(asyncCompleted);
							});
						}	
					}, true);
				}
				else
				{
					base.Selected(controller, tableView, item, indexPath);
				}

				tableView.DeselectRow(indexPath, true);
			}