summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Build.Tasks
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2016-12-23 09:21:30 (GMT)
committerGitHub <noreply@github.com>2016-12-23 09:21:30 (GMT)
commitc34016dc84a30a351d9323285b68ce6cb02af969 (patch)
tree1c223684896b460d13a0fe84f4d91926f540f922 /Xamarin.Forms.Build.Tasks
parentb96df000db76ba3490589c37e93224271249bc88 (diff)
downloadxamarin-forms-c34016dc84a30a351d9323285b68ce6cb02af969.zip
xamarin-forms-c34016dc84a30a351d9323285b68ce6cb02af969.tar.gz
xamarin-forms-c34016dc84a30a351d9323285b68ce6cb02af969.tar.bz2
Xamlc compile data triggers (#648)
* [Xaml] DataTrigger and PropertyCondition no longer use a ServiceProvider * [XamlC] avoid generating ServiceProvider for unused ProvideValue * fix tests
Diffstat (limited to 'Xamarin.Forms.Build.Tasks')
-rw-r--r--Xamarin.Forms.Build.Tasks/CompiledValueProviders/PassthroughValueProvider.cs18
-rw-r--r--Xamarin.Forms.Build.Tasks/CompiledValueProviders/TriggerValueProvider.cs1
-rw-r--r--Xamarin.Forms.Build.Tasks/Xamarin.Forms.Build.Tasks.csproj1
3 files changed, 19 insertions, 1 deletions
diff --git a/Xamarin.Forms.Build.Tasks/CompiledValueProviders/PassthroughValueProvider.cs b/Xamarin.Forms.Build.Tasks/CompiledValueProviders/PassthroughValueProvider.cs
new file mode 100644
index 0000000..b3d59f9
--- /dev/null
+++ b/Xamarin.Forms.Build.Tasks/CompiledValueProviders/PassthroughValueProvider.cs
@@ -0,0 +1,18 @@
+using System.Collections.Generic;
+
+using Mono.Cecil;
+using Mono.Cecil.Cil;
+
+using Xamarin.Forms.Xaml;
+using Xamarin.Forms.Build.Tasks;
+
+namespace Xamarin.Forms.Core.XamlC
+{
+ class PassthroughValueProvider : ICompiledValueProvider
+ {
+ public IEnumerable<Instruction> ProvideValue(VariableDefinitionReference vardefref, ModuleDefinition module, BaseNode node, ILContext context)
+ {
+ yield break;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Build.Tasks/CompiledValueProviders/TriggerValueProvider.cs b/Xamarin.Forms.Build.Tasks/CompiledValueProviders/TriggerValueProvider.cs
index c2875c7..6a0ca82 100644
--- a/Xamarin.Forms.Build.Tasks/CompiledValueProviders/TriggerValueProvider.cs
+++ b/Xamarin.Forms.Build.Tasks/CompiledValueProviders/TriggerValueProvider.cs
@@ -8,7 +8,6 @@ using Xamarin.Forms.Build.Tasks;
namespace Xamarin.Forms.Core.XamlC
{
-
class TriggerValueProvider : ICompiledValueProvider
{
public IEnumerable<Instruction> ProvideValue(VariableDefinitionReference vardefref, ModuleDefinition module, BaseNode node, ILContext context)
diff --git a/Xamarin.Forms.Build.Tasks/Xamarin.Forms.Build.Tasks.csproj b/Xamarin.Forms.Build.Tasks/Xamarin.Forms.Build.Tasks.csproj
index ac7d6f1..21c5168 100644
--- a/Xamarin.Forms.Build.Tasks/Xamarin.Forms.Build.Tasks.csproj
+++ b/Xamarin.Forms.Build.Tasks/Xamarin.Forms.Build.Tasks.csproj
@@ -108,6 +108,7 @@
<Compile Include="CompiledValueProviders\SetterValueProvider.cs" />
<Compile Include="CompiledValueProviders\ICompiledValueProvider.cs" />
<Compile Include="CompiledValueProviders\TriggerValueProvider.cs" />
+ <Compile Include="CompiledValueProviders\PassthroughValueProvider.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">