diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2017-03-16 20:09:22 +0100 |
---|---|---|
committer | Samantha Houts <samantha@teamredwall.com> | 2017-03-16 12:09:22 -0700 |
commit | 467c1befa1379c2644a3607d87db9a6178575306 (patch) | |
tree | dd5153c7d38ca310177f56a24587ad69d56f0498 /Xamarin.Forms.Xaml.UnitTests | |
parent | eb8b4d19450e3264fdd20e964f48facca6521070 (diff) | |
download | xamarin-forms-467c1befa1379c2644a3607d87db9a6178575306.tar.gz xamarin-forms-467c1befa1379c2644a3607d87db9a6178575306.tar.bz2 xamarin-forms-467c1befa1379c2644a3607d87db9a6178575306.zip |
Resource loading (#815)
* Resource Loader
* Replace XamlLoader API by ResourceLoader for the Previewer
* instruct generated IL to use the resourceLoader
* [docs] update docs
* oops
* [docs] fix docs
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests')
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/DefaultCtorRouting2.xaml.cs | 5 | ||||
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/DefaultCtorRouting2.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/DefaultCtorRouting2.xaml.cs index 05254770..faa9fedc 100644 --- a/Xamarin.Forms.Xaml.UnitTests/DefaultCtorRouting2.xaml.cs +++ b/Xamarin.Forms.Xaml.UnitTests/DefaultCtorRouting2.xaml.cs @@ -26,7 +26,10 @@ namespace Xamarin.Forms.Xaml.UnitTests public void TearDown() { Device.PlatformServices = null; +#pragma warning disable 0618 Internals.XamlLoader.XamlFileProvider = null; +#pragma warning restore 0618 + } [Test] @@ -39,7 +42,9 @@ namespace Xamarin.Forms.Xaml.UnitTests [Test] public void ShouldntBeCompiled() { +#pragma warning disable 0618 Internals.XamlLoader.XamlFileProvider = (t) => { +#pragma warning restore 0618 if (t == typeof(DefaultCtorRouting2)) return @"<?xml version=""1.0"" encoding=""UTF-8""?> <ContentPage xmlns=""http://xamarin.com/schemas/2014/forms"" diff --git a/Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs index 10c3f2e2..dcffb3c5 100644 --- a/Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs +++ b/Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs @@ -25,7 +25,10 @@ namespace Xamarin.Forms.Xaml.UnitTests [SetUp] public void SetUp() { +#pragma warning disable 0618 Xamarin.Forms.Xaml.Internals.XamlLoader.XamlFileProvider = null; +#pragma warning restore 0618 + } [TestCase(false)] @@ -35,7 +38,9 @@ namespace Xamarin.Forms.Xaml.UnitTests var layout = new XamlLoaderGetXamlForTypeTests(useCompiledXaml); Assert.That(layout.Content, Is.TypeOf<Button>()); +#pragma warning disable 0618 Xamarin.Forms.Xaml.Internals.XamlLoader.XamlFileProvider = (t) => { +#pragma warning restore 0618 if (t == typeof(XamlLoaderGetXamlForTypeTests)) return @" <ContentPage xmlns=""http://xamarin.com/schemas/2014/forms"" |