Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #17 from anujb/master

Added iOS and Android support via Xamarin
  • Loading branch information...
commit 3fa7f963fbca26cbd8526bf6b4221c41f1b73512 2 parents b384a61 + 19d216c
@whenrik whenrik authored
Showing with 1,588 additions and 61 deletions.
  1. +1 −0  Components/json.net-4.5.11.info
  2. BIN  Components/json.net-4.5.11.png
  3. +47 −0 Components/json.net-4.5.11/component/Details.md
  4. +27 −0 Components/json.net-4.5.11/component/GettingStarted.md
  5. +1 −0  Components/json.net-4.5.11/component/License.md
  6. +18 −0 Components/json.net-4.5.11/component/Manifest.xml
  7. BIN  Components/json.net-4.5.11/component/icons/json.net_128x128.png
  8. BIN  Components/json.net-4.5.11/component/icons/json.net_512x512.png
  9. BIN  Components/json.net-4.5.11/lib/android/Newtonsoft.Json.dll
  10. BIN  Components/json.net-4.5.11/lib/ios/Newtonsoft.Json.dll
  11. +19 −0 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Assets/AboutAssets.txt
  12. +77 −0 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Json.NET.Android.Sample.csproj
  13. +22 −0 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Json.NET.Android.Sample.sln
  14. +50 −0 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/MainActivity.cs
  15. +41 −0 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Properties/AssemblyInfo.cs
  16. +44 −0 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/AboutResources.txt
  17. BIN  Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/Drawable/Icon.png
  18. +23 −0 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/Layout/Main.axml
  19. +88 −0 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/Resource.Designer.cs
  20. +5 −0 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/Values/Strings.xml
  21. +39 −0 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/AppDelegate.cs
  22. BIN  Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Default-568h@2x.png
  23. +14 −0 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Info.plist
  24. +108 −0 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Json.NET iOS Sample.csproj
  25. +32 −0 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Json.NET.iOS.Sample.sln
  26. +20 −0 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Main.cs
  27. +49 −0 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/SampleViewController.cs
  28. +36 −0 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/SampleViewController.designer.cs
  29. +285 −0 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/SampleViewController.xib
  30. +174 −0 Divan.Android/Divan.Robot.csproj
  31. +44 −0 Divan.Android/Resources/AboutResources.txt
  32. +57 −0 Divan.Android/Resources/Resource.designer.cs
  33. +4 −0 Divan.Android/Resources/values/Strings.xml
  34. +164 −0 Divan.iOS/Divan.iOS.csproj
  35. +12 −6 Divan.sln
  36. +6 −0 src/CouchDatabase.cs
  37. +74 −54 src/CouchDesignDocument.cs
  38. +7 −1 src/ICouchDatabase.cs
View
1  Components/json.net-4.5.11.info
@@ -0,0 +1 @@
+{"Name":"Json.NET","Id":42,"Alias":"json.net","Description":"Json.NET is a high-performance JSON framework.\n\n## Features\n\n - Flexible JSON serializer for converting between .NET objects and JSON\n - LINQ to JSON for manually reading and writing JSON\n - High performance, faster than .NET\u0027s built-in JSON serializers\n - Write indented, easy to read JSON\n - Convert JSON to and from XML\n\nFor simple conversions to and from JSON strings and .NET objects,\nJsonConvert provides the SerializeObject and DeserializeObject methods.\n\n```csharp\nusing Newtonsoft.Json;\n...\n\npublic class Person\n{\n public string Name { get; set; }\n public DateTime Birthday { get; set; }\n}\n\nvoid PersonToJsonToPersonExample ()\n{\n var person = new Person { Name = \"Bob\", Birthday = new DateTime (1987, 2, 2) };\n var json = JsonConvert.SerializeObject (person);\n Console.WriteLine (\"JSON representation of person: {0}\", json);\n var person2 = JsonConvert.DeserializeObject\u003cPerson\u003e (json);\n Console.WriteLine (\"{0} - {1}\", person2.Name, person2.Birthday);\n}\n```\n\nFor dealing with JSON data in more direct form, without mapping them to C# classes, use LINQ to JSON:\n\n```csharp\nusing Newtonsoft.Json.Linq;\n...\n\nvoid LinqExample ()\n{\n string json = @\"{ Name: \u0027Bob\u0027, HairColor: \u0027Brown\u0027 }\";\n var bob = JObject.Parse (json);\n \n Console.WriteLine (\"{0} with {1} hair\", bob[\"Name\"], bob[\"HairColor\"]);\n}\n```\n","Version":"4.5.11","Summary":"A high-performance JSON framework for .NET.","QuickStart":"For simple conversions to and from JSON strings and .NET objects,\nJsonConvert provides the SerializeObject and DeserializeObject methods.\n\n```csharp\npublic class Person\n{\n\tpublic string Name { get; set; }\n\tpublic DateTime Birthday { get; set; }\n}\n\nPerson person = new Person { Name = \"Bob\", Birthday = new DateTime (1987, 2, 2) };\nstring output = Newtonsoft.Json.JsonConvert.SerializeObject (person);\nConsole.WriteLine (output);\nConsole.WriteLine();\n\nperson = Newtonsoft.Json.JsonConvert.DeserializeObject\u003cPerson\u003e (output);\nConsole.WriteLine (\"{0} - {1}\", person.Name, person.Birthday);\n```\n\nFor dealing with JSON objects in more direct form, there\u0027s LINQ to JSON:\n\n```csharp\nstring json = @\"{ Name: \u0027Bob\u0027, HairColor: \u0027Brown\u0027 }\";\nvar bob = Newtonsoft.Json.Linq.JObject.Parse (json);\n\nConsole.WriteLine (\"{0} with {1} hair\", (string)bob[\"Name\"], (string)bob[\"HairColor\"]);\n```","Hash":"4819d5786e4bca48bbd4cd5c3e03f0d8","TargetPlatforms":["ios","android"]}
View
BIN  Components/json.net-4.5.11.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
47 Components/json.net-4.5.11/component/Details.md
@@ -0,0 +1,47 @@
+Json.NET is a high-performance JSON framework.
+
+## Features
+
+ - Flexible JSON serializer for converting between .NET objects and JSON
+ - LINQ to JSON for manually reading and writing JSON
+ - High performance, faster than .NET's built-in JSON serializers
+ - Write indented, easy to read JSON
+ - Convert JSON to and from XML
+
+For simple conversions to and from JSON strings and .NET objects,
+JsonConvert provides the SerializeObject and DeserializeObject methods.
+
+```csharp
+using Newtonsoft.Json;
+...
+
+public class Person
+{
+ public string Name { get; set; }
+ public DateTime Birthday { get; set; }
+}
+
+void PersonToJsonToPersonExample ()
+{
+ var person = new Person { Name = "Bob", Birthday = new DateTime (1987, 2, 2) };
+ var json = JsonConvert.SerializeObject (person);
+ Console.WriteLine ("JSON representation of person: {0}", json);
+ var person2 = JsonConvert.DeserializeObject<Person> (json);
+ Console.WriteLine ("{0} - {1}", person2.Name, person2.Birthday);
+}
+```
+
+For dealing with JSON data in more direct form, without mapping them to C# classes, use LINQ to JSON:
+
+```csharp
+using Newtonsoft.Json.Linq;
+...
+
+void LinqExample ()
+{
+ string json = @"{ Name: 'Bob', HairColor: 'Brown' }";
+ var bob = JObject.Parse (json);
+
+ Console.WriteLine ("{0} with {1} hair", bob["Name"], bob["HairColor"]);
+}
+```
View
27 Components/json.net-4.5.11/component/GettingStarted.md
@@ -0,0 +1,27 @@
+For simple conversions to and from JSON strings and .NET objects,
+JsonConvert provides the SerializeObject and DeserializeObject methods.
+
+```csharp
+public class Person
+{
+ public string Name { get; set; }
+ public DateTime Birthday { get; set; }
+}
+
+Person person = new Person { Name = "Bob", Birthday = new DateTime (1987, 2, 2) };
+string output = Newtonsoft.Json.JsonConvert.SerializeObject (person);
+Console.WriteLine (output);
+Console.WriteLine();
+
+person = Newtonsoft.Json.JsonConvert.DeserializeObject<Person> (output);
+Console.WriteLine ("{0} - {1}", person.Name, person.Birthday);
+```
+
+For dealing with JSON objects in more direct form, there's LINQ to JSON:
+
+```csharp
+string json = @"{ Name: 'Bob', HairColor: 'Brown' }";
+var bob = Newtonsoft.Json.Linq.JObject.Parse (json);
+
+Console.WriteLine ("{0} with {1} hair", (string)bob["Name"], (string)bob["HairColor"]);
+```
View
1  Components/json.net-4.5.11/component/License.md
@@ -0,0 +1 @@
+# The MIT License (MIT)
View
18 Components/json.net-4.5.11/component/Manifest.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component format="1" id="json.net">
+ <name>Json.NET</name>
+ <publisher>James Newton-King</publisher>
+ <publisher-url>http://james.newtonking.com/projects/json-net.aspx</publisher-url>
+ <version>4.5.11</version>
+ <summary>A high-performance JSON framework for .NET.</summary>
+ <samples>
+ <sample id="Json.NET.Android.Sample">
+ <name>Android Sample.</name>
+ <summary>Android Sample</summary>
+ </sample>
+ <sample id="Json.NET.iOS.Sample">
+ <name>iOS Sample.</name>
+ <summary>iOS Sample</summary>
+ </sample>
+ </samples>
+</component>
View
BIN  Components/json.net-4.5.11/component/icons/json.net_128x128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Components/json.net-4.5.11/component/icons/json.net_512x512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Components/json.net-4.5.11/lib/android/Newtonsoft.Json.dll
Binary file not shown
View
BIN  Components/json.net-4.5.11/lib/ios/Newtonsoft.Json.dll
Binary file not shown
View
19 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Assets/AboutAssets.txt
@@ -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 you 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
77 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Json.NET.Android.Sample.csproj
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{A15E29B4-3BA6-4946-AD78-B8AFDC09884D}</ProjectGuid>
+ <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Json.NET.Android.Sample</RootNamespace>
+ <AssemblyName>Json.NET.Android.Sample</AssemblyName>
+ <FileAlignment>512</FileAlignment>
+ <AndroidApplication>true</AndroidApplication>
+ <AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
+ <AndroidLinkMode>None</AndroidLinkMode>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
+ <AndroidLinkMode>SdkOnly</AndroidLinkMode>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Mono.Android" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Xml" />
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>../../lib\/android/Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MainActivity.cs" />
+ <Compile Include="Resources\Resource.Designer.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\AboutResources.txt" />
+ <None Include="Assets\AboutAssets.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidResource Include="Resources\Layout\Main.axml" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidResource Include="Resources\Values\Strings.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidResource Include="Resources\Drawable\Icon.png" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
View
22 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Json.NET.Android.Sample.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Json.NET.Android.Sample", "Json.NET.Android.Sample.csproj", "{A15E29B4-3BA6-4946-AD78-B8AFDC09884D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A15E29B4-3BA6-4946-AD78-B8AFDC09884D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A15E29B4-3BA6-4946-AD78-B8AFDC09884D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A15E29B4-3BA6-4946-AD78-B8AFDC09884D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {A15E29B4-3BA6-4946-AD78-B8AFDC09884D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A15E29B4-3BA6-4946-AD78-B8AFDC09884D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A15E29B4-3BA6-4946-AD78-B8AFDC09884D}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
50 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/MainActivity.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Text;
+using Android.App;
+using Android.Widget;
+using Android.OS;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace Json.NET.Android.Sample
+{
+ [Activity(Label = "Json.NET.Android.Sample", MainLauncher = true, Icon = "@drawable/icon")]
+ public class MainActivity : Activity
+ {
+ private EditText json;
+ private TextView output;
+
+ protected override void OnCreate(Bundle bundle)
+ {
+ base.OnCreate (bundle);
+ SetContentView (Resource.Layout.Main);
+
+ FindViewById<Button> (Resource.Id.Parse).Click += OnClickParse;
+ this.json = FindViewById<EditText> (Resource.Id.Json);
+ this.output = FindViewById<TextView> (Resource.Id.Output);
+ }
+
+ private void OnClickParse (object sender, EventArgs eventArgs)
+ {
+ try
+ {
+ JObject obj = JObject.Parse (this.json.Text);
+
+ StringBuilder builder = new StringBuilder();
+ foreach (var kvp in obj)
+ builder.AppendLine (kvp.Key + " = " + kvp.Value);
+
+ this.output.Text = builder.ToString();
+ }
+ catch (FormatException ex)
+ {
+ this.output.Text = ex.ToString();
+ }
+ catch (JsonException ex)
+ {
+ this.output.Text = ex.ToString();
+ }
+ }
+ }
+}
+
View
41 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Properties/AssemblyInfo.cs
@@ -0,0 +1,41 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using Android.App;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Json.NET.Android.Sample")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Json.NET.Android.Sample")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a557ce8c-9dbe-4b93-8fc4-95ffc126cf14")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+
+// Add some common permissions, these can be removed if not needed
+[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
+[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
View
44 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/AboutResources.txt
@@ -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.xml),
+an internationalization string table (Strings.xml) and some icons (drawable/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, the build action should be set
+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
+"Resource" that contains the tokens for each one of the resources included. For example,
+for the above Resources layout, this is what the Resource class would expose:
+
+public class Resource {
+ public class Drawable {
+ public const int Icon = 0x123;
+ }
+
+ public class Layout {
+ public const int Main = 0x456;
+ }
+
+ public class String {
+ public const int FirstString = 0xabc;
+ public const int SecondString = 0xbcd;
+ }
+}
+
+You would then use Resource.Drawable.Icon to reference the Drawable/Icon.png file, or
+Resource.Layout.Main to reference the Layout/Main.axml file, or Resource.String.FirstString
+to reference the first string in the dictionary file Values/Strings.xml.
View
BIN  Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/Drawable/Icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
23 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/Layout/Main.axml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <EditText
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/Json"
+ android:text="{ &quot;name&quot; : &quot;Foo&quot;, &quot;age&quot;: 22 }"
+ android:singleLine="false"
+ android:lines="7" />
+ <Button
+ android:id="@+id/Parse"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/Parse" />
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:id="@+id/Output"
+ android:singleLine="false" />
+</LinearLayout>
View
88 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/Resource.Designer.cs
@@ -0,0 +1,88 @@
+#pragma warning disable 1591
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.18010
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: Android.Runtime.ResourceDesignerAttribute("Json.NET.Android.Sample.Resource", IsApplication=true)]
+
+namespace Json.NET.Android.Sample
+{
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("Novell.MonoDroid.Build.Tasks", "1.0.0.0")]
+ public partial class Resource
+ {
+
+ public static void UpdateIdValues()
+ {
+ }
+
+ public partial class Attribute
+ {
+
+ private Attribute()
+ {
+ }
+ }
+
+ public partial class Drawable
+ {
+
+ // aapt resource value: 0x7f020000
+ public const int Icon = 2130837504;
+
+ private Drawable()
+ {
+ }
+ }
+
+ public partial class Id
+ {
+
+ // aapt resource value: 0x7f050000
+ public const int Json = 2131034112;
+
+ // aapt resource value: 0x7f050002
+ public const int Output = 2131034114;
+
+ // aapt resource value: 0x7f050001
+ public const int Parse = 2131034113;
+
+ private Id()
+ {
+ }
+ }
+
+ public partial class Layout
+ {
+
+ // aapt resource value: 0x7f030000
+ public const int Main = 2130903040;
+
+ private Layout()
+ {
+ }
+ }
+
+ public partial class String
+ {
+
+ // aapt resource value: 0x7f040001
+ public const int ApplicationName = 2130968577;
+
+ // aapt resource value: 0x7f040000
+ public const int Parse = 2130968576;
+
+ private String()
+ {
+ }
+ }
+ }
+}
+#pragma warning restore 1591
View
5 Components/json.net-4.5.11/samples/Json.NET.Android.Sample/Resources/Values/Strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="Parse">Parse</string>
+ <string name="ApplicationName">Json.NET.Android.Sample</string>
+</resources>
View
39 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/AppDelegate.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+
+namespace Sample
+{
+ // The UIApplicationDelegate for the application. This class is responsible for launching the
+ // User Interface of the application, as well as listening (and optionally responding) to
+ // application events from iOS.
+ [Register ("AppDelegate")]
+ public partial class AppDelegate : UIApplicationDelegate
+ {
+ // class-level declarations
+ UIWindow window;
+ SampleViewController viewController;
+
+ //
+ // This method is invoked when the application has loaded and is ready to run. In this
+ // method you should instantiate the window, load the UI into it and then make the window
+ // visible.
+ //
+ // You have 17 seconds to return from this method, or iOS will terminate your application.
+ //
+ public override bool FinishedLaunching (UIApplication app, NSDictionary options)
+ {
+ window = new UIWindow (UIScreen.MainScreen.Bounds);
+
+ viewController = new SampleViewController ();
+ window.RootViewController = viewController;
+ window.MakeKeyAndVisible ();
+
+ return true;
+ }
+ }
+}
+
View
BIN  Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
14 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Info.plist
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>MinimumOSVersion</key>
+ <string>5.0</string>
+</dict>
+</plist>
View
108 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Json.NET iOS Sample.csproj
@@ -0,0 +1,108 @@
+<?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)' == '' ">iPhoneSimulator</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B09D4948-3CF2-4F34-B83B-186B28E116B2}</ProjectGuid>
+ <ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>Sample</RootNamespace>
+ <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
+ <AssemblyName>Sample</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <MtouchDebug>True</MtouchDebug>
+ <MtouchLink>None</MtouchLink>
+ <ConsolePause>False</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin\iPhoneSimulator\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ <MtouchLink>None</MtouchLink>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\iPhone\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodesignKey>iPhone Developer</CodesignKey>
+ <MtouchDebug>True</MtouchDebug>
+ <ConsolePause>False</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin\iPhone\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ <CodesignKey>iPhone Developer</CodesignKey>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ <CodesignKey>iPhone Distribution</CodesignKey>
+ <BuildIpa>True</BuildIpa>
+ <CodesignProvision>Automatic:AdHoc</CodesignProvision>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin\iPhone\AppStore</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ <CodesignProvision>Automatic:AppStore</CodesignProvision>
+ <CodesignKey>iPhone Distribution</CodesignKey>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="monotouch" />
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>../../lib\/android/Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Resources\" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Info.plist" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Main.cs" />
+ <Compile Include="AppDelegate.cs" />
+ <Compile Include="SampleViewController.cs" />
+ <Compile Include="SampleViewController.designer.cs">
+ <DependentUpon>SampleViewController.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <InterfaceDefinition Include="SampleViewController.xib" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Content Include="Default-568h%402x.png" />
+ </ItemGroup>
+</Project>
View
32 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Json.NET.iOS.Sample.sln
@@ -0,0 +1,32 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Json.NET iOS Sample", "Json.NET iOS Sample.csproj", "{B09D4948-3CF2-4F34-B83B-186B28E116B2}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Debug|iPhone = Debug|iPhone
+ Release|iPhone = Release|iPhone
+ Ad-Hoc|iPhone = Ad-Hoc|iPhone
+ AppStore|iPhone = AppStore|iPhone
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.AppStore|iPhone.Build.0 = AppStore|iPhone
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Debug|iPhone.Build.0 = Debug|iPhone
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Release|iPhone.ActiveCfg = Release|iPhone
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Release|iPhone.Build.0 = Release|iPhone
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {B09D4948-3CF2-4F34-B83B-186B28E116B2}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = Json.NET iOS Sample.csproj
+ EndGlobalSection
+EndGlobal
View
20 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/Main.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+
+namespace Sample
+{
+ public class Application
+ {
+ // This is the main entry point of the application.
+ static void Main (string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main (args, null, "AppDelegate");
+ }
+ }
+}
View
49 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/SampleViewController.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Drawing;
+using System.Text;
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace Sample
+{
+ public partial class SampleViewController : UIViewController
+ {
+ public SampleViewController () : base ("SampleViewController", null)
+ {
+ }
+
+ partial void Parse (NSObject sender)
+ {
+ string json = Json.Text;
+ try
+ {
+ JObject obj = JObject.Parse (json);
+
+ StringBuilder builder = new StringBuilder();
+ foreach (var kvp in obj)
+ builder.AppendLine (String.Format ("{0} = {1}", kvp.Key, kvp.Value));
+
+ Output.Text = builder.ToString();
+ }
+ catch (FormatException fex)
+ {
+ Output.Text = fex.ToString();
+ }
+ catch (JsonException jex)
+ {
+ Output.Text = jex.ToString();
+ }
+
+ Json.ResignFirstResponder();
+ }
+
+ public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
+ {
+ // Return true for supported orientations
+ return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown);
+ }
+ }
+}
+
View
36 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/SampleViewController.designer.cs
@@ -0,0 +1,36 @@
+// WARNING
+//
+// This file has been generated automatically by Xamarin Studio to store outlets and
+// actions made in the Xcode designer. If it is removed, they will be lost.
+// Manual changes to this file may not be handled correctly.
+//
+using MonoTouch.Foundation;
+
+namespace Sample
+{
+ [Register ("SampleViewController")]
+ partial class SampleViewController
+ {
+ [Outlet]
+ MonoTouch.UIKit.UITextView Json { get; set; }
+
+ [Outlet]
+ MonoTouch.UIKit.UITextView Output { get; set; }
+
+ [Action ("Parse:")]
+ partial void Parse (MonoTouch.Foundation.NSObject sender);
+
+ void ReleaseDesignerOutlets ()
+ {
+ if (Json != null) {
+ Json.Dispose ();
+ Json = null;
+ }
+
+ if (Output != null) {
+ Output.Dispose ();
+ Output = null;
+ }
+ }
+ }
+}
View
285 Components/json.net-4.5.11/samples/Json.NET.iOS.Sample/SampleViewController.xib
@@ -0,0 +1,285 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1552</int>
+ <string key="IBDocument.SystemVersion">11G63b</string>
+ <string key="IBDocument.InterfaceBuilderVersion">3084</string>
+ <string key="IBDocument.AppKitVersion">1138.51</string>
+ <string key="IBDocument.HIToolboxVersion">569.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">2083</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBProxyObject</string>
+ <string>IBUIButton</string>
+ <string>IBUITextView</string>
+ <string>IBUIView</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUIButton" id="963948227">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{124, 196}, {73, 44}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="503125016"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Parse</string>
+ <object class="NSColor" key="IBUIHighlightedTitleColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription">
+ <int key="type">2</int>
+ <double key="pointSize">15</double>
+ </object>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">15</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ <object class="IBUITextView" id="826913809">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 188}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="963948227"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <object class="NSColor" key="IBUIBackgroundColor" id="277719325">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">{ Name: 'Foo', Age: 22 }</string>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocorrectionType">1</int>
+ <bool key="IBUIEnablesReturnKeyAutomatically">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="132505614">
+ <int key="type">1</int>
+ <double key="pointSize">14</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="95316854">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">14</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ <object class="IBUITextView" id="503125016">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">276</int>
+ <string key="NSFrame">{{0, 247}, {320, 213}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <reference key="IBUIBackgroundColor" ref="277719325"/>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIEditable">NO</bool>
+ <string key="IBUIText"/>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocapitalizationType">2</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIFontDescription" ref="132505614"/>
+ <reference key="IBUIFont" ref="95316854"/>
+ </object>
+ </array>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="826913809"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">Json</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="826913809"/>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">Output</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="503125016"/>
+ </object>
+ <int key="connectionID">13</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">Parse:</string>
+ <reference key="source" ref="963948227"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">9</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="826913809"/>
+ <reference ref="503125016"/>
+ <reference ref="963948227"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="963948227"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="826913809"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="503125016"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">SampleViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">13</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">SampleViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">Parse:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">Parse:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">Parse:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <dictionary class="NSMutableDictionary" key="outlets">
+ <string key="Json">UITextView</string>
+ <string key="Output">UITextView</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <object class="IBToOneOutletInfo" key="Json">
+ <string key="name">Json</string>
+ <string key="candidateClassName">UITextView</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="Output">
+ <string key="name">Output</string>
+ <string key="candidateClassName">UITextView</string>
+ </object>
+ </dictionary>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/SampleViewController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">2083</string>
+ </data>
+</archive>
View
174 Divan.Android/Divan.Robot.csproj
@@ -0,0 +1,174 @@
+<?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>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{E48E0CCB-5298-4A72-B85E-868C3841701A}</ProjectGuid>
+ <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Divan.Robot</RootNamespace>
+ <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
+ <AndroidResgenClass>Resource</AndroidResgenClass>
+ <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
+ <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
+ <AssemblyName>Divan.Android</AssemblyName>
+ <TargetFrameworkVersion>v4.2</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;XAMARIN</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AndroidLinkMode>None</AndroidLinkMode>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="Mono.Android" />
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\Components\json.net-4.5.11\lib\android\Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.Services" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Resources\Resource.designer.cs" />
+ <Compile Include="..\src\CouchBulkDeleteDocuments.cs">
+ <Link>CouchBulkDeleteDocuments.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchBulkDocuments.cs">
+ <Link>CouchBulkDocuments.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchBulkKeys.cs">
+ <Link>CouchBulkKeys.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchConflictException.cs">
+ <Link>CouchConflictException.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchDatabase.cs">
+ <Link>CouchDatabase.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchDesignDocument.cs">
+ <Link>CouchDesignDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchDocument.cs">
+ <Link>CouchDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchDocumentWrapper.cs">
+ <Link>CouchDocumentWrapper.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchException.cs">
+ <Link>CouchException.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchGenericViewResult.cs">
+ <Link>CouchGenericViewResult.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchJsonDocument.cs">
+ <Link>CouchJsonDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchNotFoundException.cs">
+ <Link>CouchNotFoundException.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchPermanentViewResult.cs">
+ <Link>CouchPermanentViewResult.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchQuery.cs">
+ <Link>CouchQuery.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchQueryDocument.cs">
+ <Link>CouchQueryDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchRecord.cs">
+ <Link>CouchRecord.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchRequest.cs">
+ <Link>CouchRequest.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchServer.cs">
+ <Link>CouchServer.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchViewDefinition.cs">
+ <Link>CouchViewDefinition.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchViewDefinitionBase.cs">
+ <Link>CouchViewDefinitionBase.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchViewResult.cs">
+ <Link>CouchViewResult.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchViewResultStream.cs">
+ <Link>CouchViewResultStream.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICanJson.cs">
+ <Link>ICanJson.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchDatabase.cs">
+ <Link>ICouchDatabase.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchDocument.cs">
+ <Link>ICouchDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchRequest.cs">
+ <Link>ICouchRequest.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchServer.cs">
+ <Link>ICouchServer.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchViewDefinition.cs">
+ <Link>ICouchViewDefinition.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchViewDefinitionBase.cs">
+ <Link>ICouchViewDefinitionBase.cs</Link>
+ </Compile>
+ <Compile Include="..\src\IReconcilingDocument.cs">
+ <Link>IReconcilingDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ISelfContained.cs">
+ <Link>ISelfContained.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ReconcileStrategy.cs">
+ <Link>ReconcileStrategy.cs</Link>
+ </Compile>
+ <Compile Include="..\src\Linq\CouchLinqQuery.cs">
+ <Link>Linq\CouchLinqQuery.cs</Link>
+ </Compile>
+ <Compile Include="..\src\Linq\CouchQueryProvider.cs">
+ <Link>Linq\CouchQueryProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\src\Linq\ExpressionVisitor.cs">
+ <Link>Linq\ExpressionVisitor.cs</Link>
+ </Compile>
+ <Compile Include="..\src\Linq\TypeSystem.cs">
+ <Link>Linq\TypeSystem.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\AboutResources.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidResource Include="Resources\values\Strings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+ <ItemGroup>
+ <XamarinComponentReference Include="json.net">
+ <InstallationInProgress>False</InstallationInProgress>
+ <Version>4.5.11</Version>
+ <Visible>False</Visible>
+ </XamarinComponentReference>
+ </ItemGroup>
+</Project>
View
44 Divan.Android/Resources/AboutResources.txt
@@ -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
57 Divan.Android/Resources/Resource.designer.cs
@@ -0,0 +1,57 @@
+#pragma warning disable 1591
+// ------------------------------------------------------------------------------
+// <autogenerated>
+// This code was generated by a tool.
+// Mono Runtime Version: 4.0.30319.17020
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </autogenerated>
+// ------------------------------------------------------------------------------
+
+[assembly: Android.Runtime.ResourceDesignerAttribute("Divan.Robot.Resource", IsApplication=false)]
+
+namespace Divan.Robot
+{
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
+ public partial class Resource
+ {
+
+ static Resource()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ public partial class Attribute
+ {
+
+ static Attribute()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ private Attribute()
+ {
+ }
+ }
+
+ public partial class String
+ {
+
+ // aapt resource value: 0x7f020000
+ public static int library_name = 2130837504;
+
+ static String()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ private String()
+ {
+ }
+ }
+ }
+}
+#pragma warning restore 1591
View
4 Divan.Android/Resources/values/Strings.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="library_name">Divan.Android</string>
+</resources>
View
164 Divan.iOS/Divan.iOS.csproj
@@ -0,0 +1,164 @@
+<?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>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{9334D823-3D5F-4C1D-A40B-53C57939C310}</ProjectGuid>
+ <ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Divan.iOS</RootNamespace>
+ <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
+ <AssemblyName>Divan.iOS</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;XAMARIN</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="monotouch" />
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\Components\json.net-4.5.11\lib\ios\Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.Services" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Resources\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Compile Include="..\src\CouchBulkDeleteDocuments.cs">
+ <Link>CouchBulkDeleteDocuments.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchBulkDocuments.cs">
+ <Link>CouchBulkDocuments.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchBulkKeys.cs">
+ <Link>CouchBulkKeys.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchConflictException.cs">
+ <Link>CouchConflictException.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchDatabase.cs">
+ <Link>CouchDatabase.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchDesignDocument.cs">
+ <Link>CouchDesignDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchDocument.cs">
+ <Link>CouchDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchDocumentWrapper.cs">
+ <Link>CouchDocumentWrapper.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchException.cs">
+ <Link>CouchException.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchGenericViewResult.cs">
+ <Link>CouchGenericViewResult.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchJsonDocument.cs">
+ <Link>CouchJsonDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchNotFoundException.cs">
+ <Link>CouchNotFoundException.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchPermanentViewResult.cs">
+ <Link>CouchPermanentViewResult.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchQuery.cs">
+ <Link>CouchQuery.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchQueryDocument.cs">
+ <Link>CouchQueryDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchRecord.cs">
+ <Link>CouchRecord.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchRequest.cs">
+ <Link>CouchRequest.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchServer.cs">
+ <Link>CouchServer.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchViewDefinition.cs">
+ <Link>CouchViewDefinition.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchViewDefinitionBase.cs">
+ <Link>CouchViewDefinitionBase.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchViewResult.cs">
+ <Link>CouchViewResult.cs</Link>
+ </Compile>
+ <Compile Include="..\src\CouchViewResultStream.cs">
+ <Link>CouchViewResultStream.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICanJson.cs">
+ <Link>ICanJson.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchDatabase.cs">
+ <Link>ICouchDatabase.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchDocument.cs">
+ <Link>ICouchDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchRequest.cs">
+ <Link>ICouchRequest.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchServer.cs">
+ <Link>ICouchServer.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchViewDefinition.cs">
+ <Link>ICouchViewDefinition.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ICouchViewDefinitionBase.cs">
+ <Link>ICouchViewDefinitionBase.cs</Link>
+ </Compile>
+ <Compile Include="..\src\IReconcilingDocument.cs">
+ <Link>IReconcilingDocument.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ISelfContained.cs">
+ <Link>ISelfContained.cs</Link>
+ </Compile>
+ <Compile Include="..\src\ReconcileStrategy.cs">
+ <Link>ReconcileStrategy.cs</Link>
+ </Compile>
+ <Compile Include="..\src\Linq\CouchLinqQuery.cs">
+ <Link>Linq\CouchLinqQuery.cs</Link>
+ </Compile>
+ <Compile Include="..\src\Linq\CouchQueryProvider.cs">
+ <Link>Linq\CouchQueryProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\src\Linq\ExpressionVisitor.cs">
+ <Link>Linq\ExpressionVisitor.cs</Link>
+ </Compile>
+ <Compile Include="..\src\Linq\TypeSystem.cs">
+ <Link>Linq\TypeSystem.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <XamarinComponentReference Include="json.net">
+ <InstallationInProgress>False</InstallationInProgress>
+ <Version>4.5.11</Version>
+ <Visible>False</Visible>
+ </XamarinComponentReference>
+ </ItemGroup>
+</Project>
View
18 Divan.sln
@@ -5,7 +5,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Divan", "src\Divan.csproj",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Trivial", "samples\Trivial\Trivial.csproj", "{CDCC7924-F227-46DC-B2E6-2BBE06B84AF2}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Divan.Test", "Tests\Divan.Test.csproj", "{09FB3192-8F25-4112-A8BB-93C83F6C3DDD}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Divan.iOS", "Divan.iOS\Divan.iOS.csproj", "{9334D823-3D5F-4C1D-A40B-53C57939C310}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Divan.Robot", "Divan.Android\Divan.Robot.csproj", "{E48E0CCB-5298-4A72-B85E-868C3841701A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,21 +15,25 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {09FB3192-8F25-4112-A8BB-93C83F6C3DDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {09FB3192-8F25-4112-A8BB-93C83F6C3DDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {09FB3192-8F25-4112-A8BB-93C83F6C3DDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {09FB3192-8F25-4112-A8BB-93C83F6C3DDD}.Release|Any CPU.Build.0 = Release|Any CPU
{37AC0B66-5340-4B81-BC62-3EE80233A011}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{37AC0B66-5340-4B81-BC62-3EE80233A011}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37AC0B66-5340-4B81-BC62-3EE80233A011}.Release|Any CPU.ActiveCfg = Release|Any CPU
{37AC0B66-5340-4B81-BC62-3EE80233A011}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9334D823-3D5F-4C1D-A40B-53C57939C310}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9334D823-3D5F-4C1D-A40B-53C57939C310}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9334D823-3D5F-4C1D-A40B-53C57939C310}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9334D823-3D5F-4C1D-A40B-53C57939C310}.Release|Any CPU.Build.0 = Release|Any CPU
{CDCC7924-F227-46DC-B2E6-2BBE06B84AF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CDCC7924-F227-46DC-B2E6-2BBE06B84AF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CDCC7924-F227-46DC-B2E6-2BBE06B84AF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CDCC7924-F227-46DC-B2E6-2BBE06B84AF2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E48E0CCB-5298-4A72-B85E-868C3841701A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E48E0CCB-5298-4A72-B85E-868C3841701A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E48E0CCB-5298-4A72-B85E-868C3841701A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E48E0CCB-5298-4A72-B85E-868C3841701A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = src\Divan.csproj
+ StartupItem = Divan.iOS\Divan.iOS.csproj
Policies = $0
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = None
View
6 src/CouchDatabase.cs
@@ -4,7 +4,10 @@
using System.Net;
using System.Text;
using System;
+#if XAMARIN
+#else
using Divan.Lucene;
+#endif
using Newtonsoft.Json.Linq;
using System.IO;
@@ -669,11 +672,14 @@ public CouchQuery Query(ICouchViewDefinition view)
return new CouchQuery(view);
}
+ #if XAMARIN
+ #else
public CouchLuceneQuery Query(CouchLuceneViewDefinition view)
{
return new CouchLuceneQuery(view);
}
+ #endif
public CouchQuery QueryAllDocuments()
{
View
128 src/CouchDesignDocument.cs
@@ -1,7 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
+#if XAMARIN
+#else
using Divan.Lucene;
+#endif
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -14,9 +17,12 @@ public class CouchDesignDocument : CouchDocument, IEquatable<CouchDesignDocument
{
public IList<CouchViewDefinition> Definitions = new List<CouchViewDefinition>();
- // This List is only used if you also have Couchdb-Lucene installed
- public IList<CouchLuceneViewDefinition> LuceneDefinitions = new List<CouchLuceneViewDefinition>();
-
+#if XAMARIN
+#else
+ // This List is only used if you also have Couchdb-Lucene installed
+ public IList<CouchLuceneViewDefinition> LuceneDefinitions = new List<CouchLuceneViewDefinition>();
+#endif
+
public string Language = "javascript";
public ICouchDatabase Owner;
@@ -72,27 +78,32 @@ public void RemoveView(CouchViewDefinition view)
Definitions.Remove(view);
}
- /// <summary>
- /// Add Lucene fulltext view.
- /// </summary>
- /// <param name="name">Name of view</param>
- /// <param name="index">Index function</param>
- /// <returns></returns>
- public CouchLuceneViewDefinition AddLuceneView(string name, string index)
- {
- var def = new CouchLuceneViewDefinition(name, index, this);
- LuceneDefinitions.Add(def);
- return def;
- }
- /// <summary>
- /// Add a Lucene view with a predefined index function that will index EVERYTHING.
- /// </summary>
- /// <returns></returns>
- public CouchLuceneViewDefinition AddLuceneViewIndexEverything(string name)
- {
- return AddLuceneView(name,
- @"function(doc) {
+#if XAMARIN
+
+#else
+
+ /// <summary>
+ /// Add Lucene fulltext view.
+ /// </summary>
+ /// <param name="name">Name of view</param>
+ /// <param name="index">Index function</param>
+ /// <returns></returns>
+ public CouchLuceneViewDefinition AddLuceneView(string name, string index)
+ {
+ var def = new CouchLuceneViewDefinition(name, index, this);
+ LuceneDefinitions.Add(def);
+ return def;
+ }
+
+ /// <summary>
+ /// Add a Lucene view with a predefined index function that will index EVERYTHING.
+ /// </summary>
+ /// <returns></returns>
+ public CouchLuceneViewDefinition AddLuceneViewIndexEverything(string name)
+ {
+ return AddLuceneView(name,
+ @"function(doc) {
var ret = new Document();
function idx(obj) {
@@ -117,25 +128,26 @@ public CouchLuceneViewDefinition AddLuceneViewIndexEverything(string name)
ret.attachment(""attachment"", i);
}
}}");
- }
-
- // All these three methods duplicated for Lucene views, perhaps we should hold them all in one List?
- public void RemoveLuceneViewNamed(string viewName)
- {
- RemoveLuceneView(FindLuceneView(viewName));
- }
-
- private CouchLuceneViewDefinition FindLuceneView(string name)
- {
- return LuceneDefinitions.Where(x => x.Name == name).First();
- }
-
- public void RemoveLuceneView(CouchLuceneViewDefinition view)
- {
- view.Doc = null;
- LuceneDefinitions.Remove(view);
- }
-
+ }
+
+ // All these three methods duplicated for Lucene views, perhaps we should hold them all in one List?
+ public void RemoveLuceneViewNamed(string viewName)
+ {
+ RemoveLuceneView(FindLuceneView(viewName));
+ }
+
+ private CouchLuceneViewDefinition FindLuceneView(string name)
+ {
+ return LuceneDefinitions.Where(x => x.Name == name).First();
+ }
+
+ public void RemoveLuceneView(CouchLuceneViewDefinition view)
+ {
+ view.Doc = null;
+ LuceneDefinitions.Remove(view);
+ }
+
+#endif
/// <summary>
/// If this design document is missing in the database,
/// or if it is different - then we save it overwriting the one in the db.
@@ -167,18 +179,21 @@ public override void WriteJson(JsonWriter writer)
definition.WriteJson(writer);
}
writer.WriteEndObject();
-
- // If we have Lucene definitions we write them too
- if (LuceneDefinitions.Count > 0)
- {
- writer.WritePropertyName("fulltext");
- writer.WriteStartObject();
- foreach (var definition in LuceneDefinitions)
- {
- definition.WriteJson(writer);
- }
- writer.WriteEndObject();
- }
+#if XAMARIN
+
+#else
+ // If we have Lucene definitions we write them too
+ if (LuceneDefinitions.Count > 0)
+ {
+ writer.WritePropertyName("fulltext");
+ writer.WriteStartObject();
+ foreach (var definition in LuceneDefinitions)
+ {
+ definition.WriteJson(writer);
+ }
+ writer.WriteEndObject();
+ }
+#endif
}
public override void ReadJson(JObject obj)
@@ -196,6 +211,10 @@ public override void ReadJson(JObject obj)
Definitions.Add(v);
}
+#if XAMARIN
+
+#else
+
var fulltext = (JObject)obj["fulltext"];
// If we have Lucene definitions we read them too
if (fulltext != null)
@@ -207,6 +226,7 @@ public override void ReadJson(JObject obj)
LuceneDefinitions.Add(v);
}
}
+#endif
}
public bool Equals(CouchDesignDocument other)
View
8 src/ICouchDatabase.cs
@@ -2,7 +2,10 @@
using System.Collections.Generic;
using System.IO;
using System.Net;
+#if XAMARIN
+#else
using Divan.Lucene;
+#endif
using Newtonsoft.Json.Linq;
namespace Divan
@@ -48,7 +51,10 @@ public interface ICouchDatabase
ICouchViewDefinition NewTempView(string designDoc, string viewName, string mapText);
CouchQuery Query(ICouchViewDefinition view);
CouchQuery Query(string designName, string viewName);
- CouchLuceneQuery Query(CouchLuceneViewDefinition view);
+ #if XAMARIN
+ #else
+ CouchLuceneQuery Query(CouchLuceneViewDefinition view);
+ #endif
CouchQuery QueryAllDocuments();
WebResponse ReadAttachment(string documentId, string attachmentName);
WebResponse ReadAttachment(ICouchDocument document, string attachmentName);
Please sign in to comment.
Something went wrong with that request. Please try again.