Add Android presentation to a web view

Fixes #14
This commit is contained in:
Frank A. Krueger 2017-07-07 18:04:09 -07:00
parent 3236b3835e
commit 9f34f5f428
18 changed files with 605 additions and 6 deletions

View File

@ -14,10 +14,14 @@ namespace Ooui
static readonly Type iosNSUrl;
static readonly Type iosNSUrlRequest;
static readonly Assembly androidAssembly;
static readonly Type androidActivityType;
static readonly Type androidWebViewType;
static Platform ()
{
var asms = AppDomain.CurrentDomain.GetAssemblies ().ToDictionary (
x => x.GetName().Name);
x => x.GetName ().Name);
asms.TryGetValue ("Xamarin.iOS", out iosAssembly);
if (iosAssembly != null) {
@ -27,6 +31,12 @@ namespace Ooui
iosNSUrl = iosAssembly.GetType ("Foundation.NSUrl");
iosNSUrlRequest = iosAssembly.GetType ("Foundation.NSUrlRequest");
}
asms.TryGetValue ("Mono.Android", out androidAssembly);
if (androidAssembly != null) {
androidActivityType = androidAssembly.GetType ("Android.App.Activity");
androidWebViewType = androidAssembly.GetType ("Android.Webkit.WebView");
}
}
public static void OpenBrowser (string url, object presenter)
@ -34,11 +44,31 @@ namespace Ooui
if (iosAssembly != null) {
OpenBrowserOniOS (url, presenter);
}
else if (androidAssembly != null) {
OpenBrowserOnAndroid (url, presenter);
}
else {
StartBrowserProcess (url);
}
}
static void OpenBrowserOnAndroid (string url, object presenter)
{
var presenterType = GetObjectType (presenter);
object presenterWebView = null;
if (presenter != null && androidWebViewType.IsAssignableFrom (presenterType)) {
presenterWebView = presenter;
}
if (presenterWebView == null) {
throw new ArgumentException ("Presenter must be a WebView", nameof(presenter));
}
var m = androidWebViewType.GetMethod ("LoadUrl", BindingFlags.Public|BindingFlags.Instance, null, CallingConventions.Any, new Type[] { typeof(string) }, null);
m.Invoke (presenterWebView, new object[] { url });
}
static void OpenBrowserOniOS (string url, object presenter)
{
var presenterType = GetObjectType (presenter);
@ -83,8 +113,8 @@ namespace Ooui
var m = iosUIViewControllerType.GetMethod ("PresentViewController");
Console.WriteLine (presenterViewController);
Console.WriteLine (browserVC);
// Console.WriteLine (presenterViewController);
// Console.WriteLine (browserVC);
m.Invoke (presenterViewController, new object[] { browserVC, false, null });
}
@ -116,7 +146,7 @@ namespace Ooui
// System.Console.WriteLine($"K={kv.Key}, V={kv.Value}");
// }
Console.WriteLine ($"Process.Start {cmd} {args}");
// Console.WriteLine ($"Process.Start {cmd} {args}");
return Process.Start (cmd, args);
}
}

View File

@ -0,0 +1,181 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>AndroidTests</RootNamespace>
<AssemblyName>AndroidTests</AssemblyName>
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;NUNIT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<AndroidSupportedAbis>arm64-v8a;armeabi;armeabi-v7a;x86</AndroidSupportedAbis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>NUNIT</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="Xamarin.Android.NUnitLite" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="..\..\Ooui\Button.cs">
<Link>Ooui\Button.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Canvas.cs">
<Link>Ooui\Canvas.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\CanvasRenderingContext2D.cs">
<Link>Ooui\CanvasRenderingContext2D.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Color.cs">
<Link>Ooui\Color.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Div.cs">
<Link>Ooui\Div.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Element.cs">
<Link>Ooui\Element.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\EventTarget.cs">
<Link>Ooui\EventTarget.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Form.cs">
<Link>Ooui\Form.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\FormControl.cs">
<Link>Ooui\FormControl.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Heading.cs">
<Link>Ooui\Heading.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Image.cs">
<Link>Ooui\Image.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Input.cs">
<Link>Ooui\Input.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Label.cs">
<Link>Ooui\Label.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\List.cs">
<Link>Ooui\List.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\ListItem.cs">
<Link>Ooui\ListItem.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Message.cs">
<Link>Ooui\Message.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Node.cs">
<Link>Ooui\Node.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Paragraph.cs">
<Link>Ooui\Paragraph.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Platform.cs">
<Link>Ooui\Platform.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Select.cs">
<Link>Ooui\Select.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Span.cs">
<Link>Ooui\Span.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\Style.cs">
<Link>Ooui\Style.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\TextArea.cs">
<Link>Ooui\TextArea.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\TextNode.cs">
<Link>Ooui\TextNode.cs</Link>
</Compile>
<Compile Include="..\..\Ooui\UI.cs">
<Link>Ooui\UI.cs</Link>
</Compile>
<Compile Include="..\..\Tests\ButtonTests.cs">
<Link>Tests\ButtonTests.cs</Link>
</Compile>
<Compile Include="..\..\Tests\CanvasTests.cs">
<Link>Tests\CanvasTests.cs</Link>
</Compile>
<Compile Include="..\..\Tests\EventTargetTests.cs">
<Link>Tests\EventTargetTests.cs</Link>
</Compile>
<Compile Include="..\..\Tests\MessageSendTests.cs">
<Link>Tests\MessageSendTests.cs</Link>
</Compile>
<Compile Include="..\..\Tests\NodeTests.cs">
<Link>Tests\NodeTests.cs</Link>
</Compile>
<Compile Include="..\..\Tests\StyleTests.cs">
<Link>Tests\StyleTests.cs</Link>
</Compile>
<Compile Include="..\..\Tests\UITests.cs">
<Link>Tests\UITests.cs</Link>
</Compile>
<Compile Include="PresentTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="..\..\Ooui\Client.js">
<Link>Ooui\Client.js</Link>
</None>
<None Include="packages.config" />
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\mipmap-hdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\Icon.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\Ooui\Client.js">
<Link>Client.js</Link>
<LogicalName>Ooui.Client.js</LogicalName>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

View File

@ -0,0 +1,19 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with your package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

View File

@ -0,0 +1,32 @@
using System.Reflection;
using Android.App;
using Android.OS;
using Android.Webkit;
using Xamarin.Android.NUnitLite;
namespace AndroidTests
{
[Activity (Label = "AndroidTests", MainLauncher = true)]
public class MainActivity : TestSuiteActivity
{
public static MainActivity Shared;
public WebView Browser;
protected override void OnCreate (Bundle bundle)
{
Browser = new WebView (this);
Shared = this;
// tests can be inside the main assembly
AddTest (Assembly.GetExecutingAssembly ());
// or in any reference assemblies
// AddTest (typeof (Your.Library.TestClass).Assembly);
// Once you called base.OnCreate(), you cannot add more assemblies.
base.OnCreate (bundle);
}
}
}

View File

@ -0,0 +1,18 @@
using System;
using NUnit.Framework;
using Ooui;
namespace Tests
{
[TestFixture]
public class PresentTests
{
[TestCase]
public void Present ()
{
var b = new Button ("Click Me");
UI.Publish ("/b", b);
UI.Present ("/b", AndroidTests.MainActivity.Shared.Browser);
}
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="AndroidTests.AndroidTests">
<uses-sdk android:minSdkVersion="19" />
<application android:label="AndroidTests"></application>
</manifest>

View File

@ -0,0 +1,27 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Android.App;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("AndroidTests")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("${AuthorCopyright}")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("1.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

View File

@ -0,0 +1,44 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.axml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable/
icon.png
layout/
main.axml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called "R"
(this is an Android convention) that contains the tokens for each one of the resources
included. For example, for the above Resources layout, this is what the R class would expose:
public class R {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
to reference the layout/main.axml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

View File

@ -0,0 +1,175 @@
#pragma warning disable 1591
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
[assembly: Android.Runtime.ResourceDesignerAttribute("AndroidTests.Resource", IsApplication=true)]
namespace AndroidTests
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public static void UpdateIdValues()
{
global::Xamarin.Android.NUnitLite.Resource.Id.OptionHostName = global::AndroidTests.Resource.Id.OptionHostName;
global::Xamarin.Android.NUnitLite.Resource.Id.OptionPort = global::AndroidTests.Resource.Id.OptionPort;
global::Xamarin.Android.NUnitLite.Resource.Id.OptionRemoteServer = global::AndroidTests.Resource.Id.OptionRemoteServer;
global::Xamarin.Android.NUnitLite.Resource.Id.OptionsButton = global::AndroidTests.Resource.Id.OptionsButton;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultFullName = global::AndroidTests.Resource.Id.ResultFullName;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultMessage = global::AndroidTests.Resource.Id.ResultMessage;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultResultState = global::AndroidTests.Resource.Id.ResultResultState;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultRunSingleMethodTest = global::AndroidTests.Resource.Id.ResultRunSingleMethodTest;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultStackTrace = global::AndroidTests.Resource.Id.ResultStackTrace;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsFailed = global::AndroidTests.Resource.Id.ResultsFailed;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsId = global::AndroidTests.Resource.Id.ResultsId;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsIgnored = global::AndroidTests.Resource.Id.ResultsIgnored;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsInconclusive = global::AndroidTests.Resource.Id.ResultsInconclusive;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsMessage = global::AndroidTests.Resource.Id.ResultsMessage;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsPassed = global::AndroidTests.Resource.Id.ResultsPassed;
global::Xamarin.Android.NUnitLite.Resource.Id.ResultsResult = global::AndroidTests.Resource.Id.ResultsResult;
global::Xamarin.Android.NUnitLite.Resource.Id.RunTestsButton = global::AndroidTests.Resource.Id.RunTestsButton;
global::Xamarin.Android.NUnitLite.Resource.Id.TestSuiteListView = global::AndroidTests.Resource.Id.TestSuiteListView;
global::Xamarin.Android.NUnitLite.Resource.Layout.options = global::AndroidTests.Resource.Layout.options;
global::Xamarin.Android.NUnitLite.Resource.Layout.results = global::AndroidTests.Resource.Layout.results;
global::Xamarin.Android.NUnitLite.Resource.Layout.test_result = global::AndroidTests.Resource.Layout.test_result;
global::Xamarin.Android.NUnitLite.Resource.Layout.test_suite = global::AndroidTests.Resource.Layout.test_suite;
}
public partial class Attribute
{
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class Id
{
// aapt resource value: 0x7f040001
public const int OptionHostName = 2130968577;
// aapt resource value: 0x7f040002
public const int OptionPort = 2130968578;
// aapt resource value: 0x7f040000
public const int OptionRemoteServer = 2130968576;
// aapt resource value: 0x7f040010
public const int OptionsButton = 2130968592;
// aapt resource value: 0x7f04000b
public const int ResultFullName = 2130968587;
// aapt resource value: 0x7f04000d
public const int ResultMessage = 2130968589;
// aapt resource value: 0x7f04000c
public const int ResultResultState = 2130968588;
// aapt resource value: 0x7f04000a
public const int ResultRunSingleMethodTest = 2130968586;
// aapt resource value: 0x7f04000e
public const int ResultStackTrace = 2130968590;
// aapt resource value: 0x7f040006
public const int ResultsFailed = 2130968582;
// aapt resource value: 0x7f040003
public const int ResultsId = 2130968579;
// aapt resource value: 0x7f040007
public const int ResultsIgnored = 2130968583;
// aapt resource value: 0x7f040008
public const int ResultsInconclusive = 2130968584;
// aapt resource value: 0x7f040009
public const int ResultsMessage = 2130968585;
// aapt resource value: 0x7f040005
public const int ResultsPassed = 2130968581;
// aapt resource value: 0x7f040004
public const int ResultsResult = 2130968580;
// aapt resource value: 0x7f04000f
public const int RunTestsButton = 2130968591;
// aapt resource value: 0x7f040011
public const int TestSuiteListView = 2130968593;
static Id()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Id()
{
}
}
public partial class Layout
{
// aapt resource value: 0x7f030000
public const int options = 2130903040;
// aapt resource value: 0x7f030001
public const int results = 2130903041;
// aapt resource value: 0x7f030002
public const int test_result = 2130903042;
// aapt resource value: 0x7f030003
public const int test_suite = 2130903043;
static Layout()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Layout()
{
}
}
public partial class Mipmap
{
// aapt resource value: 0x7f020000
public const int Icon = 2130837504;
static Mipmap()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Mipmap()
{
}
}
}
}
#pragma warning restore 1591

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="monoandroid71" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="monoandroid71" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid71" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="monoandroid71" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="monoandroid70" />
<package id="System.AppContext" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Collections" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.ComponentModel.TypeConverter" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Console" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Globalization" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.IO" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Linq" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Net.Http" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Reflection" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Runtime" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Runtime.Serialization.Formatters" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Threading" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="monoandroid71" />
<package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="monoandroid71" />
</packages>

View File

@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iOSTests", "iOSTests\iOSTests.csproj", "{1379E3B3-99A7-4B46-BED6-1338A94EBBD4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidTests", "AndroidTests\AndroidTests.csproj", "{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -25,5 +27,17 @@ Global
{1379E3B3-99A7-4B46-BED6-1338A94EBBD4}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{1379E3B3-99A7-4B46-BED6-1338A94EBBD4}.Debug|iPhone.ActiveCfg = Debug|iPhone
{1379E3B3-99A7-4B46-BED6-1338A94EBBD4}.Debug|iPhone.Build.0 = Debug|iPhone
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Release|Any CPU.Build.0 = Release|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Release|iPhone.ActiveCfg = Release|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Release|iPhone.Build.0 = Release|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{7E8BF65C-4AA9-4F95-A8E3-527424138AB3}.Debug|iPhone.Build.0 = Debug|Any CPU
EndGlobalSection
EndGlobal

View File

@ -2,7 +2,7 @@
using NUnit.Framework;
using Ooui;
namespace iOSTests
namespace Tests
{
[TestFixture]
public class PresentTests

View File

@ -5,7 +5,7 @@ using NUnit.Framework;
using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
using TestMethodAttribute = NUnit.Framework.TestCaseAttribute;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MicrosofVisualStudio.TestTools.UnitTesting;
#endif
using Ooui;