From b3365b7f7db2ab9505d9f0c704f86dd3b24b0caa Mon Sep 17 00:00:00 2001 From: Chris King Date: Fri, 25 Mar 2016 13:53:19 -0700 Subject: Reformat using statements --- Xamarin.Forms.Platform.WP8/Deserializer.cs | 14 +++++++------- Xamarin.Forms.Platform.WP8/ImageRenderer.cs | 4 ++-- Xamarin.Forms.Platform.WP8/WebViewRenderer.cs | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'Xamarin.Forms.Platform.WP8') diff --git a/Xamarin.Forms.Platform.WP8/Deserializer.cs b/Xamarin.Forms.Platform.WP8/Deserializer.cs index a0c2de00..29c0e374 100644 --- a/Xamarin.Forms.Platform.WP8/Deserializer.cs +++ b/Xamarin.Forms.Platform.WP8/Deserializer.cs @@ -18,9 +18,9 @@ namespace Xamarin.Forms.Platform.WinPhone // Make sure to use Internal return Task.Run(() => { - using(IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication()) - using(IsolatedStorageFileStream stream = store.OpenFile(PropertyStoreFile, System.IO.FileMode.OpenOrCreate)) - using(XmlDictionaryReader reader = XmlDictionaryReader.CreateBinaryReader(stream, XmlDictionaryReaderQuotas.Max)) + using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication()) + using (IsolatedStorageFileStream stream = store.OpenFile(PropertyStoreFile, System.IO.FileMode.OpenOrCreate)) + using (XmlDictionaryReader reader = XmlDictionaryReader.CreateBinaryReader(stream, XmlDictionaryReaderQuotas.Max)) { if (stream.Length == 0) return null; @@ -48,9 +48,9 @@ namespace Xamarin.Forms.Platform.WinPhone return Task.Run(() => { var success = false; - using(IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication()) - using(IsolatedStorageFileStream stream = store.OpenFile(PropertyStoreFile + ".tmp", System.IO.FileMode.OpenOrCreate)) - using(XmlDictionaryWriter writer = XmlDictionaryWriter.CreateBinaryWriter(stream)) + using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication()) + using (IsolatedStorageFileStream stream = store.OpenFile(PropertyStoreFile + ".tmp", System.IO.FileMode.OpenOrCreate)) + using (XmlDictionaryWriter writer = XmlDictionaryWriter.CreateBinaryWriter(stream)) { try { @@ -67,7 +67,7 @@ namespace Xamarin.Forms.Platform.WinPhone if (!success) return; - using(IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication()) + using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication()) { try { diff --git a/Xamarin.Forms.Platform.WP8/ImageRenderer.cs b/Xamarin.Forms.Platform.WP8/ImageRenderer.cs index 8be9c15d..ba0649fb 100644 --- a/Xamarin.Forms.Platform.WP8/ImageRenderer.cs +++ b/Xamarin.Forms.Platform.WP8/ImageRenderer.cs @@ -133,7 +133,7 @@ namespace Xamarin.Forms.Platform.WinPhone var streamsource = imagesource as StreamImageSource; if (streamsource != null && streamsource.Stream != null) { - using(Stream stream = await streamsource.GetStreamAsync(cancelationToken)) + using (Stream stream = await streamsource.GetStreamAsync(cancelationToken)) { bitmapimage = new BitmapImage(); bitmapimage.SetSource(stream); @@ -151,7 +151,7 @@ namespace Xamarin.Forms.Platform.WinPhone var imageLoader = imagesoure as UriImageSource; if (imageLoader != null && imageLoader.Uri != null) { - using(Stream streamimage = await imageLoader.GetStreamAsync(cancelationToken)) + using (Stream streamimage = await imageLoader.GetStreamAsync(cancelationToken)) { if (streamimage != null && streamimage.CanRead) { diff --git a/Xamarin.Forms.Platform.WP8/WebViewRenderer.cs b/Xamarin.Forms.Platform.WP8/WebViewRenderer.cs index 4b3151b0..364babe2 100644 --- a/Xamarin.Forms.Platform.WP8/WebViewRenderer.cs +++ b/Xamarin.Forms.Platform.WP8/WebViewRenderer.cs @@ -109,7 +109,7 @@ namespace Xamarin.Forms.Platform.WinPhone async Task SaveToIsoStore(string fileName, string html) { IIsolatedStorageFile store = Device.PlatformServices.GetUserStoreForApplication(); - using(Stream file = await store.OpenFileAsync(fileName, FileMode.CreateNew, FileAccess.Write).ConfigureAwait(false)) + using (Stream file = await store.OpenFileAsync(fileName, FileMode.CreateNew, FileAccess.Write).ConfigureAwait(false)) { byte[] bytes = Encoding.UTF8.GetBytes(html); await file.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false); -- cgit v1.2.3