summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT/WindowsIsolatedStorage.cs
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2017-03-07 14:56:24 -0500
committerGitHub <noreply@github.com>2017-03-07 14:56:24 -0500
commite6d5186c8acbf37b877c7ca3c77a378352a3743d (patch)
treed61ca8ea619f7844e9e0a973dbd7bac794e39147 /Xamarin.Forms.Platform.WinRT/WindowsIsolatedStorage.cs
parent2b92142ab2a501de71d3572efc0e5deb2b7bae9a (diff)
downloadxamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.gz
xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.bz2
xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.zip
Remove InternalsVisibleTo from Core to XF.Platforms.* (#782)
* Remove InternalsVisibleTo from Core to XF.Platforms.* * Changes per Jason's code review * Move LockableObservableListWrapper to internals namespace * Changes per Stephane's code review * update docs * Touch code to get CI to run tests * Rebase; Update documentation
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT/WindowsIsolatedStorage.cs')
-rw-r--r--Xamarin.Forms.Platform.WinRT/WindowsIsolatedStorage.cs25
1 files changed, 13 insertions, 12 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/WindowsIsolatedStorage.cs b/Xamarin.Forms.Platform.WinRT/WindowsIsolatedStorage.cs
index a6e48fea..42bdc3b8 100644
--- a/Xamarin.Forms.Platform.WinRT/WindowsIsolatedStorage.cs
+++ b/Xamarin.Forms.Platform.WinRT/WindowsIsolatedStorage.cs
@@ -4,6 +4,7 @@ using System.Threading.Tasks;
using Windows.Storage;
using Windows.Storage.FileProperties;
using Windows.Storage.Streams;
+using Xamarin.Forms.Internals;
#if WINDOWS_UWP
@@ -63,27 +64,27 @@ namespace Xamarin.Forms.Platform.WinRT
return properties.DateModified;
}
- public async Task<Stream> OpenFileAsync(string path, FileMode mode, FileAccess access)
+ public async Task<Stream> OpenFileAsync(string path, Internals.FileMode mode, Internals.FileAccess access)
{
StorageFile file;
switch (mode)
{
- case FileMode.CreateNew:
+ case Internals.FileMode.CreateNew:
file = await _folder.CreateFileAsync(path, CreationCollisionOption.FailIfExists).AsTask().ConfigureAwait(false);
break;
- case FileMode.Create:
- case FileMode.Truncate: // TODO See if ReplaceExisting already truncates
+ case Internals.FileMode.Create:
+ case Internals.FileMode.Truncate: // TODO See if ReplaceExisting already truncates
file = await _folder.CreateFileAsync(path, CreationCollisionOption.ReplaceExisting).AsTask().ConfigureAwait(false);
break;
- case FileMode.OpenOrCreate:
- case FileMode.Append:
+ case Internals.FileMode.OpenOrCreate:
+ case Internals.FileMode.Append:
file = await _folder.CreateFileAsync(path, CreationCollisionOption.OpenIfExists).AsTask().ConfigureAwait(false);
break;
- case FileMode.Open:
+ case Internals.FileMode.Open:
file = await _folder.GetFileAsync(path);
break;
@@ -93,16 +94,16 @@ namespace Xamarin.Forms.Platform.WinRT
switch (access)
{
- case FileAccess.Read:
+ case Internals.FileAccess.Read:
return await file.OpenStreamForReadAsync().ConfigureAwait(false);
- case FileAccess.Write:
+ case Internals.FileAccess.Write:
Stream stream = await file.OpenStreamForWriteAsync().ConfigureAwait(false);
- if (mode == FileMode.Append)
+ if (mode == Internals.FileMode.Append)
stream.Position = stream.Length;
return stream;
- case FileAccess.ReadWrite:
+ case Internals.FileAccess.ReadWrite:
IRandomAccessStream randStream = await file.OpenAsync(FileAccessMode.ReadWrite).AsTask().ConfigureAwait(false);
return randStream.AsStream();
@@ -111,7 +112,7 @@ namespace Xamarin.Forms.Platform.WinRT
}
}
- public Task<Stream> OpenFileAsync(string path, FileMode mode, FileAccess access, FileShare share)
+ public Task<Stream> OpenFileAsync(string path, Internals.FileMode mode, Internals.FileAccess access, Internals.FileShare share)
{
return OpenFileAsync(path, mode, access);
}