Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 0b99a3d

Browse files
committed
iOS libraries + test modification
1 parent aea3b41 commit 0b99a3d

File tree

8 files changed

+157
-136
lines changed

8 files changed

+157
-136
lines changed

lib/ServiceStack.Common.MonoTouch.dll

207 KB
Binary file not shown.
637 KB
Binary file not shown.

lib/ServiceStack.Text.MonoTouch.dll

192 KB
Binary file not shown.

src/ServiceStack.OrmLite.Sqlite/ServiceStack.OrmLite.Sqlite.iOS.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
66
<ProductVersion>8.0.30703</ProductVersion>
77
<SchemaVersion>2.0</SchemaVersion>
88
<ProjectGuid>{E6EA93E2-37BC-477F-8B87-BC30C3BBDB85}</ProjectGuid>
@@ -42,7 +42,7 @@
4242
</ItemGroup>
4343
<ItemGroup>
4444
<ProjectReference Include="..\ServiceStack.OrmLite\ServiceStack.OrmLite.iOS.csproj">
45-
<Project>{7e3fea8a-c770-4d50-8ad5-f56fcf0b7e07}</Project>
45+
<Project>{7E3FEA8A-C770-4D50-8AD5-F56FCF0B7E07}</Project>
4646
<Name>ServiceStack.OrmLite.iOS</Name>
4747
</ProjectReference>
4848
</ItemGroup>

src/ServiceStack.OrmLite.iOS.sln

Lines changed: 133 additions & 115 deletions
Large diffs are not rendered by default.

src/ServiceStack.OrmLite/ServiceStack.OrmLite.iOS.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
66
<ProductVersion>8.0.30703</ProductVersion>
77
<SchemaVersion>2.0</SchemaVersion>
88
<ProjectGuid>{7E3FEA8A-C770-4D50-8AD5-F56FCF0B7E07}</ProjectGuid>
@@ -17,7 +17,7 @@
1717
<DebugType>full</DebugType>
1818
<Optimize>false</Optimize>
1919
<OutputPath>bin\iPhone\Debug</OutputPath>
20-
<DefineConstants>DEBUG</DefineConstants>
20+
<DefineConstants>DEBUG;NO_EXPRESSIONS</DefineConstants>
2121
<ErrorReport>prompt</ErrorReport>
2222
<WarningLevel>4</WarningLevel>
2323
<ConsolePause>false</ConsolePause>

src/XamarinTests/SqliteExpressionsTest.iOS/MainViewController.cs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ private static void RunAuthorTests()
207207

208208
// insert values only in Id, Name, Birthday, Rate and Active fields
209209
expected = 4;
210-
ev.Insert(rn => new { rn.Id, rn.Name, rn.Birthday, rn.Active, rn.Rate });
210+
//ev = OrmLiteConfig.DialectProvider.ExpressionVisitor<Author>();
211+
212+
//ev.Insert(rn => new { rn.Id, rn.Name, rn.Birthday, rn.Active, rn.Rate });
211213
db.InsertOnly(new Author() { Active = false, Rate = 0, Name = "Victor Grozny", Birthday = DateTime.Today.AddYears(-18) }, ev);
212214
db.InsertOnly(new Author() { Active = false, Rate = 0, Name = "Ivan Chorny", Birthday = DateTime.Today.AddYears(-19) }, ev);
213215
ev.Where(rn => !rn.Active);
@@ -230,17 +232,18 @@ private static void RunAuthorTests()
230232

231233

232234
// lets select all records ordered by Rate Descending and Name Ascending
233-
expected = 14;
234-
ev.Where().OrderBy(rn => new { at = Sql.Desc(rn.Rate), rn.Name }); // clear where condition
235-
result = db.Select(ev);
236-
Console.WriteLine(ev.WhereExpression);
237-
Console.WriteLine("Expected:{0} ; Selected:{1}, OK? {2}", expected, result.Count, expected == result.Count);
238-
Console.WriteLine(ev.OrderByExpression);
239-
var author = result.FirstOrDefault();
240-
Console.WriteLine("Expected:{0} ; Selected:{1}, OK? {2}", "Claudia Espinel", author.Name, "Claudia Espinel" == author.Name);
235+
//expected = 14;
236+
//ev.Where().OrderBy(rn => new { at = Sql.Desc(rn.Rate), rn.Name }); // clear where condition
237+
//result = db.Select(ev);
238+
//Console.WriteLine(ev.WhereExpression);
239+
//Console.WriteLine("Expected:{0} ; Selected:{1}, OK? {2}", expected, result.Count, expected == result.Count);
240+
//Console.WriteLine(ev.OrderByExpression);
241+
//var author = result.FirstOrDefault();
242+
//Console.WriteLine("Expected:{0} ; Selected:{1}, OK? {2}", "Claudia Espinel", author.Name, "Claudia Espinel" == author.Name);
241243

242244
// select only first 5 rows ....
243245

246+
ev = OrmLiteConfig.DialectProvider.ExpressionVisitor<Author>();
244247
expected = 5;
245248
ev.Limit(5); // note: order is the same as in the last sentence
246249
result = db.Select(ev);
@@ -250,16 +253,16 @@ private static void RunAuthorTests()
250253

251254
// and finally lets select only Name and City (name will be "UPPERCASED" )
252255

253-
ev.Select(rn => new { at = Sql.As(rn.Name.ToUpper(), "Name"), rn.City });
254-
Console.WriteLine(ev.SelectExpression);
255-
result = db.Select(ev);
256-
author = result.FirstOrDefault();
257-
Console.WriteLine("Expected:{0} ; Selected:{1}, OK? {2}", "Claudia Espinel".ToUpper(), author.Name, "Claudia Espinel".ToUpper() == author.Name);
256+
//ev.Select(rn => new { at = Sql.As(rn.Name.ToUpper(), "Name"), rn.City });
257+
//Console.WriteLine(ev.SelectExpression);
258+
//result = db.Select(ev);
259+
//var author = result.FirstOrDefault();
260+
//Console.WriteLine("Expected:{0} ; Selected:{1}, OK? {2}", "Claudia Espinel".ToUpper(), author.Name, "Claudia Espinel".ToUpper() == author.Name);
258261

259262
//paging :
260263
ev.Limit(0, 4);// first page, page size=4;
261264
result = db.Select(ev);
262-
author = result.FirstOrDefault();
265+
var author = result.FirstOrDefault();
263266
Console.WriteLine("Expected:{0} ; Selected:{1}, OK? {2}", "Claudia Espinel".ToUpper(), author.Name, "Claudia Espinel".ToUpper() == author.Name);
264267

265268
ev.Limit(4, 4);// second page

src/XamarinTests/SqliteExpressionsTest.iOS/SqliteExpressionsTest.iOS.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@
9595
</ItemGroup>
9696
<ItemGroup>
9797
<ProjectReference Include="..\..\ServiceStack.OrmLite.Sqlite\ServiceStack.OrmLite.Sqlite.iOS.csproj">
98-
<Project>{e6ea93e2-37bc-477f-8b87-bc30c3bbdb85}</Project>
98+
<Project>{E6EA93E2-37BC-477F-8B87-BC30C3BBDB85}</Project>
9999
<Name>ServiceStack.OrmLite.Sqlite.iOS</Name>
100100
</ProjectReference>
101101
<ProjectReference Include="..\..\ServiceStack.OrmLite\ServiceStack.OrmLite.iOS.csproj">
102-
<Project>{7e3fea8a-c770-4d50-8ad5-f56fcf0b7e07}</Project>
102+
<Project>{7E3FEA8A-C770-4D50-8AD5-F56FCF0B7E07}</Project>
103103
<Name>ServiceStack.OrmLite.iOS</Name>
104104
</ProjectReference>
105105
</ItemGroup>

0 commit comments

Comments
 (0)