MonoTouch.Dialog.JsonElement.ToAutocorrect C# (CSharp) Method

ToAutocorrect() static private method

static private ToAutocorrect ( JsonValue value ) : UITextAutocorrectionType
value System.Json.JsonValue
return UITextAutocorrectionType
		static UITextAutocorrectionType ToAutocorrect (JsonValue value)
		{
			if (value.JsonType == JsonType.Boolean)
				return ((bool) value) ? UITextAutocorrectionType.Yes : UITextAutocorrectionType.No;
			if (value.JsonType == JsonType.String){
				var s = ((string) value);
				if (s == "yes")
					return UITextAutocorrectionType.Yes;
				return UITextAutocorrectionType.No;
			}
			return UITextAutocorrectionType.Default;
		}