summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2016-11-16 20:51:53 +0100
committerJason Smith <jason.smith@xamarin.com>2016-11-16 11:51:53 -0800
commitd97dfe91b28a30e9a350155262b1149eed8d462f (patch)
tree0dd0a9cab6461d9207410c0d84e7cd8dca796af1 /Xamarin.Forms.Xaml
parentbc7755ca56e3958318434263d74611c249a59aff (diff)
downloadxamarin-forms-d97dfe91b28a30e9a350155262b1149eed8d462f.tar.gz
xamarin-forms-d97dfe91b28a30e9a350155262b1149eed8d462f.tar.bz2
xamarin-forms-d97dfe91b28a30e9a350155262b1149eed8d462f.zip
[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
Diffstat (limited to 'Xamarin.Forms.Xaml')
-rw-r--r--Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.csproj1
-rw-r--r--Xamarin.Forms.Xaml/XamlCompilationAttribute.cs1
-rw-r--r--Xamarin.Forms.Xaml/XamlFilePathAttribute.cs13
3 files changed, 15 insertions, 0 deletions
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 @@
<Compile Include="XamlCompilationAttribute.cs" />
<Compile Include="TypeArgumentsParser.cs" />
<Compile Include="PruneIgnoredNodesVisitor.cs" />
+ <Compile Include="XamlFilePathAttribute.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<ItemGroup>
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