diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-09-26 22:29:47 +0200 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-09-26 13:29:47 -0700 |
commit | 55f066584c507ec92d5054fac4f3a35f54c05522 (patch) | |
tree | 358ec7ed9a74e008b3bc601a9b391bcd193fb86b /Xamarin.Forms.Core/BoundsTypeConverter.cs | |
parent | e6a20ddedb6c8dee989b4ac19c6e83cecafe9f29 (diff) | |
download | xamarin-forms-55f066584c507ec92d5054fac4f3a35f54c05522.tar.gz xamarin-forms-55f066584c507ec92d5054fac4f3a35f54c05522.tar.bz2 xamarin-forms-55f066584c507ec92d5054fac4f3a35f54c05522.zip |
[XamlC] Compiled converters (#358)
Diffstat (limited to 'Xamarin.Forms.Core/BoundsTypeConverter.cs')
-rw-r--r-- | Xamarin.Forms.Core/BoundsTypeConverter.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Xamarin.Forms.Core/BoundsTypeConverter.cs b/Xamarin.Forms.Core/BoundsTypeConverter.cs index 549b7b63..68464f8e 100644 --- a/Xamarin.Forms.Core/BoundsTypeConverter.cs +++ b/Xamarin.Forms.Core/BoundsTypeConverter.cs @@ -3,7 +3,8 @@ using System.Globalization; namespace Xamarin.Forms { - public class BoundsTypeConverter : TypeConverter + [Xaml.ProvideCompiled ("Xamarin.Forms.Core.XamlC.BoundsTypeConverter")] + public sealed class BoundsTypeConverter : TypeConverter { public override object ConvertFromInvariantString(string value) { @@ -36,7 +37,7 @@ namespace Xamarin.Forms return new Rectangle(x, y, w, h); } - throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(Rectangle))); + throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Rectangle)}"); } } }
\ No newline at end of file |