From d97dfe91b28a30e9a350155262b1149eed8d462f Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Wed, 16 Nov 2016 20:51:53 +0100 Subject: [XamlC] use correct filePath for XamlC error reporting (#513) * [XamlG] decorate partial classes with [XamlFile] attribute * [XamlC] use correct filePath for XamlC error reporting * [docs] update docs --- Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.csproj | 1 + Xamarin.Forms.Xaml/XamlCompilationAttribute.cs | 1 + Xamarin.Forms.Xaml/XamlFilePathAttribute.cs | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 Xamarin.Forms.Xaml/XamlFilePathAttribute.cs (limited to 'Xamarin.Forms.Xaml') diff --git a/Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.csproj b/Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.csproj index f521d362..2b9d57de 100644 --- a/Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.csproj +++ b/Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.csproj @@ -82,6 +82,7 @@ + diff --git a/Xamarin.Forms.Xaml/XamlCompilationAttribute.cs b/Xamarin.Forms.Xaml/XamlCompilationAttribute.cs index 79cc87bd..fbc5656a 100644 --- a/Xamarin.Forms.Xaml/XamlCompilationAttribute.cs +++ b/Xamarin.Forms.Xaml/XamlCompilationAttribute.cs @@ -1,5 +1,6 @@ using System; using System.Reflection; +using System.Runtime.CompilerServices; namespace Xamarin.Forms.Xaml { diff --git a/Xamarin.Forms.Xaml/XamlFilePathAttribute.cs b/Xamarin.Forms.Xaml/XamlFilePathAttribute.cs new file mode 100644 index 00000000..615f290b --- /dev/null +++ b/Xamarin.Forms.Xaml/XamlFilePathAttribute.cs @@ -0,0 +1,13 @@ +using System; +using System.Runtime.CompilerServices; + +namespace Xamarin.Forms.Xaml +{ + [AttributeUsage(AttributeTargets.Class, Inherited = false)] + public sealed class XamlFilePathAttribute : Attribute + { + public XamlFilePathAttribute([CallerFilePath] string filePath = "") + { + } + } +} \ No newline at end of file -- cgit v1.2.3