Scaffold isolated storage to enable UriImageSources

This is a broken implementation that is only enough to enable
URI images.

Fixes #104
This commit is contained in:
Frank A. Krueger 2018-03-23 17:18:25 -07:00
parent 6c02b985bc
commit c0e1203313
No known key found for this signature in database
GPG Key ID: 0471C67474FFE664
2 changed files with 41 additions and 1 deletions

View File

@ -96,7 +96,7 @@ namespace Xamarin.Forms
public IIsolatedStorageFile GetUserStoreForApplication () public IIsolatedStorageFile GetUserStoreForApplication ()
{ {
throw new NotImplementedException (); return new LocalIsolatedStorageFile ();
} }
public void OpenUriAction (Uri uri) public void OpenUriAction (Uri uri)

View File

@ -0,0 +1,40 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Xamarin.Forms.Internals;
namespace Ooui.Forms
{
public class LocalIsolatedStorageFile : IIsolatedStorageFile
{
public Task CreateDirectoryAsync (string path)
{
return Task.FromResult<object> (null);
}
public Task<bool> GetDirectoryExistsAsync (string path)
{
return Task.FromResult<bool> (true);
}
public Task<bool> GetFileExistsAsync (string path)
{
return Task.FromResult<bool> (false);
}
public Task<DateTimeOffset> GetLastWriteTimeAsync (string path)
{
throw new NotSupportedException ();
}
public Task<Stream> OpenFileAsync (string path, Xamarin.Forms.Internals.FileMode mode, Xamarin.Forms.Internals.FileAccess access)
{
throw new NotSupportedException ();
}
public Task<Stream> OpenFileAsync (string path, Xamarin.Forms.Internals.FileMode mode, Xamarin.Forms.Internals.FileAccess access, Xamarin.Forms.Internals.FileShare share)
{
throw new NotSupportedException ();
}
}
}