<commit_before>using System;
using MonoTouch.UIKit;
using MonoTouch.AudioToolbox;
namespace MonoMobile.Extensions
{
	public class Notification
	{
		public Notification () 
		{
		}
	
		public void Alert (string message, Action alertCallback)
		{
			Alert(message, alertCallback, "Alert", "OK");
		}

		public void Alert (string message, Action alertCallback, string title)
		{
            Alert(message, alertCallback, title, "OK");
		}

		public void Alert (string message, Action alertCallback, string title, string buttonName)
		{
			using(var alertView = new UIAlertView(title, message, null, buttonName, null))
			{
				alertView.Show();
				alertView.Dismissed += delegate(object sender, UIButtonEventArgs e) {
					alertCallback();
				};
			}
		}

		public void Confirm (string message, Action<int> confirmCallback)
		{
			
			Confirm(message, confirmCallback, "Alert", "OK");
		}

		public void Confirm (string message, Action<int> confirmCallback, string title)
		{
			Confirm(message, confirmCallback, title, "OK");
		}

		public void Confirm (string message, Action<int> confirmCallback, string title, string buttonLabels)
		{
			using(var alertView = new UIAlertView(title, message, null, null, null))
			{
				var labels = buttonLabels.Split(new Char[]{','});	
				foreach(var label in labels)
				{
					alertView.AddButton(label);
				}
				alertView.Show();
				alertView.Clicked += delegate(object sender, UIButtonEventArgs e) {
					confirmCallback(e.ButtonIndex);<commit_msg>Allow for null callbacks in Notifications<commit_after>using System;
using MonoTouch.UIKit;
using MonoTouch.AudioToolbox;
namespace MonoMobile.Extensions
{
	public class Notification
	{
		public Notification () 
		{
		}
	
		public void Alert (string message, Action alertCallback)
		{
			Alert(message, alertCallback, "Alert", "OK");
		}

		public void Alert (string message, Action alertCallback, string title)
		{
            Alert(message, alertCallback, title, "OK");
		}

		public void Alert (string message, Action alertCallback, string title, string buttonName)
		{
			using(var alertView = new UIAlertView(title, message, null, buttonName, null))
			{
				alertView.Show();
				alertView.Dismissed += delegate(object sender, UIButtonEventArgs e) {
					if(alertCallback != null)
						alertCallback();
				};
			}
		}

		public void Confirm (string message, Action<int> confirmCallback)
		{
			
			Confirm(message, confirmCallback, "Alert", "OK");
		}

		public void Confirm (string message, Action<int> confirmCallback, string title)
		{
			Confirm(message, confirmCallback, title, "OK");
		}

		public void Confirm (string message, Action<int> confirmCallback, string title, string buttonLabels)
		{
			using(var alertView = new UIAlertView(title, message, null, null, null))
			{
				var labels = buttonLabels.Split(new Char[]{','});	
				foreach(var label in labels)
				{
					alertView.AddButton(label);
				}
				alertView.Show();
				alertView.Clicked += delegate(object sender, UIButtonEventArgs e) {
					if(confirmCallback != null)
						confirmCallback(e.ButtonIndex);
{'fraction_non_alphanumeric': 0.109020116807268, 'fraction_numerical': 0.0, 'mean_word_length': 3.909235668789809, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5555541', 'n_tokens_mistral': 1070, 'n_tokens_neox': 877, 'n_words': 252}