diff options
author | Kangho Hur <kangho.hur@samsung.com> | 2017-03-24 13:50:01 +0900 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-03-24 13:50:01 +0900 |
commit | 20daaa5702a27d1a9c7cf9dfacfdfa254ac0e5e3 (patch) | |
tree | 0a939ebe2281567132f691d5ef22b8622ad1abf9 /Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs | |
parent | 5e51e33310bda10d386289ef9812a008b9145454 (diff) | |
download | xamarin-forms-20daaa5702a27d1a9c7cf9dfacfdfa254ac0e5e3.tar.gz xamarin-forms-20daaa5702a27d1a9c7cf9dfacfdfa254ac0e5e3.tar.bz2 xamarin-forms-20daaa5702a27d1a9c7cf9dfacfdfa254ac0e5e3.zip |
Remove Xamarin.Forms.Platform.MacOS
Change-Id: Id39aa5f2767487b42a77884fd0180244f027f4a3
Diffstat (limited to 'Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs')
-rw-r--r-- | Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs b/Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs deleted file mode 100644 index 1b813a4e..00000000 --- a/Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.IO; -using Xamarin.Forms; -using Xamarin.Forms.ControlGallery.MacOS; -using Xamarin.Forms.Controls; -using Xamarin.Forms.Platform.MacOS; - -[assembly: Dependency(typeof(TestCloudService))] -[assembly: Dependency(typeof(StringProvider))] -[assembly: Dependency(typeof(CacheService))] -[assembly: ExportRenderer(typeof(DisposePage), typeof(DisposePageRenderer))] -[assembly: ExportRenderer(typeof(DisposeLabel), typeof(DisposeLabelRenderer))] - -namespace Xamarin.Forms.ControlGallery.MacOS -{ - public class CacheService : ICacheService - { - public void ClearImageCache() - { - var documents = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); - var cache = Path.Combine(documents, ".config", ".isolated-storage", "ImageLoaderCache"); - foreach (var file in Directory.GetFiles(cache)) - { - File.Delete(file); - } - } - } - - public class DisposePageRenderer : PageRenderer - { - protected override void Dispose(bool disposing) - { - if (disposing) - { - ((DisposePage)Element).SendRendererDisposed(); - } - base.Dispose(disposing); - - } - } - - public class DisposeLabelRenderer : LabelRenderer - { - protected override void Dispose(bool disposing) - { - - if (disposing) - { - ((DisposeLabel)Element).SendRendererDisposed(); - } - base.Dispose(disposing); - } - } - - public class StringProvider : IStringProvider - { - public string CoreGalleryTitle - { - get { return "iOS Core Gallery"; } - } - } - - public class TestCloudService : ITestCloudService - { - public bool IsOnTestCloud() - { - var isInTestCloud = Environment.GetEnvironmentVariable("XAMARIN_TEST_CLOUD"); - - return isInTestCloud != null && isInTestCloud.Equals("1"); - } - - public string GetTestCloudDeviceName() - { - return Environment.GetEnvironmentVariable("XTC_DEVICE_NAME"); - } - - public string GetTestCloudDevice() - { - return Environment.GetEnvironmentVariable("XTC_DEVICE"); - } - } -} - |