Skip to content

Commit

Permalink
Merge branch 'issue/523' into release/unity-ga
Browse files Browse the repository at this point in the history
Fixes #523
  • Loading branch information
borrrden committed Dec 15, 2015
2 parents 7ee5f70 + 27700bf commit d399c18
Show file tree
Hide file tree
Showing 22 changed files with 103 additions and 42 deletions.
Binary file modified samples/UnityDemo/Assets/Plugins/Couchbase.Lite.dll
Binary file not shown.
Binary file modified samples/UnityDemo/Assets/Plugins/Couchbase.Lite.dll.mdb
Binary file not shown.
Binary file modified samples/UnityDemo/Assets/Plugins/Newtonsoft.Json.dll
Binary file not shown.
Binary file modified samples/UnityDemo/Assets/Plugins/Newtonsoft.Json.dll.mdb
Binary file not shown.
Binary file modified samples/UnityDemo/Assets/Plugins/Stateless.dll.mdb
Binary file not shown.
Binary file modified samples/UnityDemo/Assets/Plugins/System.Net.Http.Net35.dll
Binary file not shown.
Binary file modified samples/UnityDemo/Assets/Plugins/System.Net.Http.Net35.dll.mdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified samples/UnityDemo/Assets/TestScene.unity
Binary file not shown.
Binary file modified samples/UnityDemo/ProjectSettings/ProjectSettings.asset
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,5 @@
<Project>{9862694D-E4FA-418B-8692-A0280FEDDF36}</Project>
<Name>System.Net.Http-net_4_5</Name>
</ProjectReference>
<ProjectReference Include="..\Couchbase.Lite.Net35\vendor\Rackspace\Rackspace.Threading\Rackspace.Threading\Rackspace.Threading.net35-client.csproj">
<Project>{52CA4A3B-F296-4489-B5F0-AD375D039B35}</Project>
<Name>Rackspace.Threading.net35-client</Name>
</ProjectReference>
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions src/Couchbase.Lite.Shared/Documents/Body.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
using System.Text;

using Sharpen;
#if __UNITY__
using InvalidDataException = System.IO.Couchbase.InvalidDataException;
#else
using InvalidDataException = System.IO.InvalidDataException;
#endif

namespace Couchbase.Lite
{
Expand Down
14 changes: 14 additions & 0 deletions src/Couchbase.Lite.Tests.Shared/ReplicationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,20 @@ protected override void SetUp()
_sg = new SyncGateway(GetReplicationProtocol(), GetReplicationServer());
}

[Test]
public void TestExpiredSession()
{
using (var remoteDb = _sg.CreateDatabase(TempDbName())) {
remoteDb.DisableGuestAccess();
var pull = database.CreatePullReplication(remoteDb.RemoteUri);
pull.SetCookie("SyncGatewaySession", "b91b2aa1f87fa804979fcd2af01dd5e7e68630bb", "/", DateTime.Now, false, true);
RunReplication(pull);
var le = pull.LastError as HttpResponseException;
Assert.IsNotNull(le);
Assert.AreEqual(HttpStatusCode.Unauthorized, le.StatusCode);
}
}

[Test]
public void TestPullerChangedEvent()
{
Expand Down
4 changes: 0 additions & 4 deletions src/Couchbase.Lite.Tests.Shared/RouterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
using Couchbase.Lite.Listener.Tcp;
using System.IO;

#if NET_3_5
using Rackspace.Threading;
#endif

namespace Couchbase.Lite
{
public class RouterTests : LiteTestCase
Expand Down
20 changes: 14 additions & 6 deletions src/Couchbase.Lite.Tests.Shared/Util/SyncGateway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,34 @@ public void Create()

try {
var putResponse = _httpClient.SendAsync(putRequest).Result;
Assert.AreEqual(HttpStatusCode.Created, putResponse.StatusCode);
} catch(WebException ex) {
if (ex.Status == WebExceptionStatus.ProtocolError) {
if(putResponse.StatusCode != HttpStatusCode.PreconditionFailed) {
Assert.AreEqual(HttpStatusCode.Created, putResponse.StatusCode);
} else {
Delete().ContinueWith(t => Create()).Wait();
return;
}
} catch(AggregateException e) {
var ex = e.InnerException as WebException;
if (ex != null && ex.Status == WebExceptionStatus.ProtocolError) {
var response = ex.Response as HttpWebResponse;
if (response != null) {
Assert.AreEqual(HttpStatusCode.PreconditionFailed, response.StatusCode);
Delete().ContinueWith(t => Create()).Wait();
return;
} else {
Assert.Fail("Error from remote: {0}", response.StatusCode);
}
} else {
Assert.Fail("Error from remote: {0}", ex);
Assert.Fail("Error from remote: {0}", e);
}
}

Thread.Sleep(500);
}

public void Delete()
public Task Delete()
{
Task.Delay(1000).ContinueWith(t =>
return Task.Delay(1000).ContinueWith(t =>
{
var server = _adminRemoteUri;
var deleteRequest = new HttpRequestMessage(HttpMethod.Delete, server);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@
<Project>{DBD30658-44C1-4903-8763-8E23FB4ADD9E}</Project>
<Name>Couchbase.Lite.Listener.Unity</Name>
</ProjectReference>
<ProjectReference Include="..\Couchbase.Lite.Unity\vendor\JSON.NET\Src\Newtonsoft.Json\Newtonsoft.Json.Net35.csproj">
<Project>{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}</Project>
<Name>Newtonsoft.Json.Net35</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
Expand Down
36 changes: 18 additions & 18 deletions src/Couchbase.Lite.Unity.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Vendor", "Vendor", "{6E3DD8
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stateless", "Couchbase.Lite.Net35\vendor\Stateless\Stateless\Stateless.csproj", "{A15EEC02-60EC-4705-A58B-A6ECD55A9628}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Net35", "Couchbase.Lite.Unity\vendor\JSON.NET\Src\Newtonsoft.Json\Newtonsoft.Json.Net35.csproj", "{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "platform.unity.standalone", "Couchbase.Lite.Unity\vendor\SQLitePCL\platform.unity.standalone.csproj", "{0E3578A2-D15E-4183-8F0F-638EC8D437B8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ugly_net35", "Couchbase.Lite.Net35\vendor\SQLitePCL\bld\ugly_net35.csproj", "{237DD22C-0BF1-469A-9BF8-C90D2CDE6A5D}"
Expand All @@ -29,6 +27,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Http.Unity", "Co
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Threading.Tasks.Unity", "Couchbase.Lite.Net35\vendor\Rackspace\Rackspace.Threading\System.Threading.Tasks.Net35\System.Threading.Tasks.Unity.csproj", "{DCB5D745-525C-46A1-BFC0-E12F87AB6165}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Net20", "Couchbase.Lite.Unity\vendor\JSON.NET\Src\Newtonsoft.Json\Newtonsoft.Json.Net20.csproj", "{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ListenerComponent", "ListenerComponent", "{93A9E803-DBF3-45BE-96FA-87D68422F401}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Couchbase.Lite.Listener.Shared", "ListenerComponent\Couchbase.Lite.Listener.Shared\Couchbase.Lite.Listener.Shared.shproj", "{5AA87149-7173-42A0-8BBC-AC618B404D46}"
Expand All @@ -55,30 +55,30 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0E3578A2-D15E-4183-8F0F-638EC8D437B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E3578A2-D15E-4183-8F0F-638EC8D437B8}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E3578A2-D15E-4183-8F0F-638EC8D437B8}.debug|Any CPU.Build.0 = Debug|Any CPU
{0E3578A2-D15E-4183-8F0F-638EC8D437B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E3578A2-D15E-4183-8F0F-638EC8D437B8}.debug|Any CPU.Build.0 = Debug|Any CPU
{0E3578A2-D15E-4183-8F0F-638EC8D437B8}.release|Any CPU.ActiveCfg = Debug|Any CPU
{0E3578A2-D15E-4183-8F0F-638EC8D437B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E3578A2-D15E-4183-8F0F-638EC8D437B8}.release|Any CPU.Build.0 = Debug|Any CPU
{0E3578A2-D15E-4183-8F0F-638EC8D437B8}.Release|Any CPU.Build.0 = Release|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.debug|Any CPU.Build.0 = Debug|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.debug|Any CPU.Build.0 = Debug|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.release|Any CPU.ActiveCfg = Debug|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.release|Any CPU.Build.0 = Debug|Any CPU
{142630F3-06CA-493E-BD08-0A6EE9EDF6A8}.Release|Any CPU.Build.0 = Release|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.debug|Any CPU.Build.0 = Debug|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.release|Any CPU.ActiveCfg = Debug|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.release|Any CPU.Build.0 = Debug|Any CPU
{1F97ED56-DA26-4802-8EBE-1D052814F920}.Release|Any CPU.Build.0 = Release|Any CPU
{237DD22C-0BF1-469A-9BF8-C90D2CDE6A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{237DD22C-0BF1-469A-9BF8-C90D2CDE6A5D}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{237DD22C-0BF1-469A-9BF8-C90D2CDE6A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{237DD22C-0BF1-469A-9BF8-C90D2CDE6A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{237DD22C-0BF1-469A-9BF8-C90D2CDE6A5D}.debug|Any CPU.Build.0 = Debug|Any CPU
{237DD22C-0BF1-469A-9BF8-C90D2CDE6A5D}.release|Any CPU.ActiveCfg = Debug|Any CPU
Expand All @@ -93,50 +93,50 @@ Global
{361F5513-A803-4B24-BEEB-FF70C42C0F54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{361F5513-A803-4B24-BEEB-FF70C42C0F54}.release|Any CPU.Build.0 = Debug|Any CPU
{361F5513-A803-4B24-BEEB-FF70C42C0F54}.Release|Any CPU.Build.0 = Release|Any CPU
{5831782E-A661-4BD0-8D3B-813B963E7B82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5831782E-A661-4BD0-8D3B-813B963E7B82}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{5831782E-A661-4BD0-8D3B-813B963E7B82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5831782E-A661-4BD0-8D3B-813B963E7B82}.debug|Any CPU.Build.0 = Debug|Any CPU
{5831782E-A661-4BD0-8D3B-813B963E7B82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5831782E-A661-4BD0-8D3B-813B963E7B82}.release|Any CPU.ActiveCfg = Debug|Any CPU
{5831782E-A661-4BD0-8D3B-813B963E7B82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5831782E-A661-4BD0-8D3B-813B963E7B82}.release|Any CPU.Build.0 = Debug|Any CPU
{5831782E-A661-4BD0-8D3B-813B963E7B82}.Release|Any CPU.Build.0 = Release|Any CPU
{5C23B1D6-96B2-45F6-8C06-B49FAFFC97B1}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C23B1D6-96B2-45F6-8C06-B49FAFFC97B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C23B1D6-96B2-45F6-8C06-B49FAFFC97B1}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C23B1D6-96B2-45F6-8C06-B49FAFFC97B1}.debug|Any CPU.Build.0 = Debug|Any CPU
{5C23B1D6-96B2-45F6-8C06-B49FAFFC97B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C23B1D6-96B2-45F6-8C06-B49FAFFC97B1}.release|Any CPU.ActiveCfg = Debug|Any CPU
{5C23B1D6-96B2-45F6-8C06-B49FAFFC97B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C23B1D6-96B2-45F6-8C06-B49FAFFC97B1}.release|Any CPU.Build.0 = Debug|Any CPU
{5C23B1D6-96B2-45F6-8C06-B49FAFFC97B1}.Release|Any CPU.Build.0 = Release|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.debug|Any CPU.Build.0 = Debug|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.release|Any CPU.ActiveCfg = Debug|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.release|Any CPU.Build.0 = Debug|Any CPU
{8424740E-F079-4D37-8B3B-E620043D2752}.Release|Any CPU.Build.0 = Release|Any CPU
{9862694D-E4FA-418B-8692-A0280FEDDF36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9862694D-E4FA-418B-8692-A0280FEDDF36}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{9862694D-E4FA-418B-8692-A0280FEDDF36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9862694D-E4FA-418B-8692-A0280FEDDF36}.debug|Any CPU.Build.0 = Debug|Any CPU
{9862694D-E4FA-418B-8692-A0280FEDDF36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9862694D-E4FA-418B-8692-A0280FEDDF36}.release|Any CPU.ActiveCfg = Debug|Any CPU
{9862694D-E4FA-418B-8692-A0280FEDDF36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9862694D-E4FA-418B-8692-A0280FEDDF36}.release|Any CPU.Build.0 = Debug|Any CPU
{9862694D-E4FA-418B-8692-A0280FEDDF36}.Release|Any CPU.Build.0 = Release|Any CPU
{A15EEC02-60EC-4705-A58B-A6ECD55A9628}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{A15EEC02-60EC-4705-A58B-A6ECD55A9628}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A15EEC02-60EC-4705-A58B-A6ECD55A9628}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{A15EEC02-60EC-4705-A58B-A6ECD55A9628}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A15EEC02-60EC-4705-A58B-A6ECD55A9628}.debug|Any CPU.Build.0 = Debug|Any CPU
{A15EEC02-60EC-4705-A58B-A6ECD55A9628}.release|Any CPU.ActiveCfg = Debug|Any CPU
{A15EEC02-60EC-4705-A58B-A6ECD55A9628}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A15EEC02-60EC-4705-A58B-A6ECD55A9628}.release|Any CPU.Build.0 = Debug|Any CPU
{A15EEC02-60EC-4705-A58B-A6ECD55A9628}.Release|Any CPU.Build.0 = Release|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.debug|Any CPU.Build.0 = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.debug|Any CPU.Build.0 = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.release|Any CPU.ActiveCfg = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.release|Any CPU.Build.0 = Debug|Any CPU
Expand All @@ -149,8 +149,8 @@ Global
{DBD30658-44C1-4903-8763-8E23FB4ADD9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DBD30658-44C1-4903-8763-8E23FB4ADD9E}.release|Any CPU.Build.0 = Debug|Any CPU
{DBD30658-44C1-4903-8763-8E23FB4ADD9E}.Release|Any CPU.Build.0 = Release|Any CPU
{DCB5D745-525C-46A1-BFC0-E12F87AB6165}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{DCB5D745-525C-46A1-BFC0-E12F87AB6165}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DCB5D745-525C-46A1-BFC0-E12F87AB6165}.debug|Any CPU.ActiveCfg = Debug|Any CPU
{DCB5D745-525C-46A1-BFC0-E12F87AB6165}.debug|Any CPU.Build.0 = Debug|Any CPU
{DCB5D745-525C-46A1-BFC0-E12F87AB6165}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DCB5D745-525C-46A1-BFC0-E12F87AB6165}.release|Any CPU.ActiveCfg = Debug|Any CPU
Expand All @@ -162,12 +162,12 @@ Global
{D06EDB2A-0AE0-4606-A8AE-AA3F6248630F} = {3D44EF32-EE84-42A0-B586-6AE71AB75CFF}
{8424740E-F079-4D37-8B3B-E620043D2752} = {3D44EF32-EE84-42A0-B586-6AE71AB75CFF}
{A15EEC02-60EC-4705-A58B-A6ECD55A9628} = {6E3DD8B6-60D2-406E-B5EE-8CC4A830CC39}
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D} = {6E3DD8B6-60D2-406E-B5EE-8CC4A830CC39}
{0E3578A2-D15E-4183-8F0F-638EC8D437B8} = {6E3DD8B6-60D2-406E-B5EE-8CC4A830CC39}
{237DD22C-0BF1-469A-9BF8-C90D2CDE6A5D} = {6E3DD8B6-60D2-406E-B5EE-8CC4A830CC39}
{1F97ED56-DA26-4802-8EBE-1D052814F920} = {6E3DD8B6-60D2-406E-B5EE-8CC4A830CC39}
{9862694D-E4FA-418B-8692-A0280FEDDF36} = {6E3DD8B6-60D2-406E-B5EE-8CC4A830CC39}
{DCB5D745-525C-46A1-BFC0-E12F87AB6165} = {6E3DD8B6-60D2-406E-B5EE-8CC4A830CC39}
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D} = {6E3DD8B6-60D2-406E-B5EE-8CC4A830CC39}
{5AA87149-7173-42A0-8BBC-AC618B404D46} = {93A9E803-DBF3-45BE-96FA-87D68422F401}
{DBD30658-44C1-4903-8763-8E23FB4ADD9E} = {93A9E803-DBF3-45BE-96FA-87D68422F401}
{27CD854D-D0A5-4EA0-A997-04CE8EDD5095} = {93A9E803-DBF3-45BE-96FA-87D68422F401}
Expand Down
9 changes: 5 additions & 4 deletions src/Couchbase.Lite.Unity/Couchbase.Lite.Unity.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<Compile Include="..\Couchbase.Lite.Net35\StringEx.cs">
<Link>StringEx.cs</Link>
</Compile>
<Compile Include="InvalidDataException.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="CopyUnityDll" BeforeTargets="PrepareForBuild">
Expand All @@ -99,10 +100,6 @@
<Project>{A15EEC02-60EC-4705-A58B-A6ECD55A9628}</Project>
<Name>Stateless</Name>
</ProjectReference>
<ProjectReference Include="vendor\JSON.NET\Src\Newtonsoft.Json\Newtonsoft.Json.Net35.csproj">
<Project>{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}</Project>
<Name>Newtonsoft.Json.Net35</Name>
</ProjectReference>
<ProjectReference Include="vendor\SQLitePCL\platform.unity.standalone.csproj">
<Project>{0E3578A2-D15E-4183-8F0F-638EC8D437B8}</Project>
<Name>platform.unity.standalone</Name>
Expand All @@ -120,6 +117,10 @@
<Project>{DCB5D745-525C-46A1-BFC0-E12F87AB6165}</Project>
<Name>System.Threading.Tasks.Unity</Name>
</ProjectReference>
<ProjectReference Include="vendor\JSON.NET\Src\Newtonsoft.Json\Newtonsoft.Json.Net20.csproj">
<Project>{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}</Project>
<Name>Newtonsoft.Json.Net20</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
45 changes: 45 additions & 0 deletions src/Couchbase.Lite.Unity/InvalidDataException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// System.InvalidDataException.cs
//
// Authors:
// Christopher James Lahey <[email protected]>
// Andreas Nahr ([email protected])
//
// Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
//

using System.Globalization;
using System.Runtime.Serialization;

namespace System.IO.Couchbase
{
[Serializable]
public sealed class InvalidDataException : SystemException
{
const int Result = unchecked ((int)0x80131503);

// Constructors
public InvalidDataException ()
: base ("Invalid data format.")
{
HResult = Result;
}

public InvalidDataException (string message)
: base (message)
{
HResult = Result;
}

public InvalidDataException (string message, Exception innerException)
: base (message, innerException)
{
HResult = Result;
}

private InvalidDataException (SerializationInfo info, StreamingContext context)
: base (info, context)
{
}
}
}

0 comments on commit d399c18

Please sign in to comment.