diff --git a/build.ps1 b/build.ps1 index bf0f95d25..c690b62bb 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,6 +1,7 @@ $msBuild = 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe' $outputFolder = '.\_output' $outputFolderMono = '.\_output_mono' +$outputFolderOsx = '.\_output_osx' $testPackageFolder = '.\_tests\' $testSearchPattern = '*.Test\bin\x86\Release' $sourceFolder = '.\src' @@ -112,6 +113,23 @@ Function PackageMono() Write-Host "##teamcity[progressFinish 'Creating Mono Package']" } +Function PackageOsx() +{ + Write-Host "##teamcity[progressStart 'Creating OS X Package']" + + if(Test-Path $outputFolderOsx) + { + Remove-Item -Recurse -Force $outputFolderMono -ErrorAction Continue + } + + Copy-Item $outputFolderMono $outputFolderOsx -recurse + + Write-Host "Adding sqlite dylibs" + Copy-Item "$sourceFolder\Libraries\sqlite\*.dylib" "$outputFolderOsx" + + Write-Host "##teamcity[progressFinish 'Creating OS X Package']" +} + Function AddJsonNet() { get-childitem $outputFolder -File -Filter Newtonsoft.Json.* -Recurse | foreach ($_) {remove-item $_.fullname} @@ -187,5 +205,6 @@ Function CleanupWindowsPackage() Build RunGrunt PackageMono +PackageOsx PackageTests CleanupWindowsPackage diff --git a/src/Exceptron.Client/Exceptron.Client.csproj b/src/Exceptron.Client/Exceptron.Client.csproj index a22db88f7..5cbe3f6bc 100644 --- a/src/Exceptron.Client/Exceptron.Client.csproj +++ b/src/Exceptron.Client/Exceptron.Client.csproj @@ -2,7 +2,7 @@ Debug - AnyCPU + x86 8.0.30703 2.0 {B1784698-592E-4132-BDFA-9817409E3A96} @@ -27,24 +27,25 @@ x86 prompt MinimumRecommendedRules.ruleset + 4 + false ..\..\_output\ TRACE - - true pdbonly x86 prompt MinimumRecommendedRules.ruleset + 4 - + diff --git a/src/Libraries/Sqlite/libsqlite3.0.dylib b/src/Libraries/Sqlite/libsqlite3.0.dylib new file mode 100644 index 000000000..364b585e7 Binary files /dev/null and b/src/Libraries/Sqlite/libsqlite3.0.dylib differ diff --git a/src/Libraries/Sqlite/libsqlite3.dylib b/src/Libraries/Sqlite/libsqlite3.dylib new file mode 120000 index 000000000..3a850bc81 --- /dev/null +++ b/src/Libraries/Sqlite/libsqlite3.dylib @@ -0,0 +1 @@ +libsqlite3.0.dylib \ No newline at end of file diff --git a/src/Libraries/Sqlite/sqlite3.dll b/src/Libraries/Sqlite/sqlite3.dll index 2d241c4ec..1058a2b17 100644 Binary files a/src/Libraries/Sqlite/sqlite3.dll and b/src/Libraries/Sqlite/sqlite3.dll differ diff --git a/src/Marr.Data/EntityGraph.cs b/src/Marr.Data/EntityGraph.cs index aee376b61..72d28dcdf 100644 --- a/src/Marr.Data/EntityGraph.cs +++ b/src/Marr.Data/EntityGraph.cs @@ -160,6 +160,14 @@ namespace Marr.Data get { return _children; } } + /// + /// Adds an Child in the graph for LazyLoaded property. + /// + public void AddLazyRelationship(Relationship childRelationship) + { + _children.Add(new EntityGraph(childRelationship.RelationshipInfo.EntityType.GetGenericArguments()[0], this, childRelationship)); + } + /// /// Adds an entity to the appropriate place in the object graph. /// @@ -182,7 +190,10 @@ namespace Marr.Data } else // RelationTypes.One { - _relationship.Setter(_parent._entity, entityInstance); + if (_relationship.IsLazyLoaded) + _relationship.Setter(_parent._entity, Activator.CreateInstance(_relationship.MemberType, entityInstance)); + else + _relationship.Setter(_parent._entity, entityInstance); } EntityReference entityRef = new EntityReference(entityInstance); diff --git a/src/Marr.Data/Marr.Data.csproj b/src/Marr.Data/Marr.Data.csproj index b369b7085..288373039 100644 --- a/src/Marr.Data/Marr.Data.csproj +++ b/src/Marr.Data/Marr.Data.csproj @@ -2,7 +2,7 @@ Debug - AnyCPU + x86 9.0.30729 2.0 {F6FC6BE7-0847-4817-A1ED-223DC647C3D7} @@ -29,6 +29,8 @@ x86 prompt MinimumRecommendedRules.ruleset + 4 + false ..\..\_output\ @@ -38,11 +40,12 @@ x86 prompt MinimumRecommendedRules.ruleset + 4 - 3.5 + 4.0 diff --git a/src/Marr.Data/QGen/QueryBuilder.cs b/src/Marr.Data/QGen/QueryBuilder.cs index cd71c17bd..ba135ac07 100644 --- a/src/Marr.Data/QGen/QueryBuilder.cs +++ b/src/Marr.Data/QGen/QueryBuilder.cs @@ -551,6 +551,23 @@ namespace Marr.Data.QGen return Join(joinType, rightMember, filterExpression); } + public virtual QueryBuilder Join(JoinType joinType, Expression>> rightEntity, Expression> filterExpression) + { + _isJoin = true; + MemberInfo rightMember = (rightEntity.Body as MemberExpression).Member; + + foreach (var item in EntGraph) + { + if (item.EntityType == typeof(TLeft)) + { + var relationship = item.Relationships.Single(v => v.Member == rightMember); + item.AddLazyRelationship(relationship); + } + } + + return Join(joinType, rightMember, filterExpression); + } + public virtual QueryBuilder Join(JoinType joinType, MemberInfo rightMember, Expression> filterExpression) { _isJoin = true; diff --git a/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj b/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj index e38573c45..be784e000 100644 --- a/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj +++ b/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj @@ -2,7 +2,7 @@ Debug - AnyCPU + x86 8.0.30703 2.0 {1B9A82C4-BCA1-4834-A33E-226F17BE070B} @@ -19,7 +19,6 @@ true bin\x86\Debug\ TRACE;DEBUG;PERFCOUNTERS - true bin\Debug\Microsoft.AspNet.SignalR.Core.XML true 1591 @@ -27,11 +26,12 @@ x86 prompt C:\Dropbox\Git\NzbDrone\src\Common\Microsoft.AspNet.SignalR.ruleset + 4 + false bin\x86\Release\ TRACE;PERFCOUNTERS - true bin\Release\Microsoft.AspNet.SignalR.Core.XML true true @@ -40,19 +40,19 @@ x86 prompt C:\Dropbox\Git\NzbDrone\src\Common\Microsoft.AspNet.SignalR.ruleset + 4 ..\packages\Microsoft.AspNet.SignalR.Client.1.1.3\lib\net40\Microsoft.AspNet.SignalR.Client.dll - - False - ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - + + ..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll + @@ -273,8 +273,6 @@ - - \ No newline at end of file diff --git a/src/UI/app.js b/src/UI/app.js index c3cb3bb57..2ab1cbdd1 100644 --- a/src/UI/app.js +++ b/src/UI/app.js @@ -23,7 +23,7 @@ require.config({ 'signalR' : 'JsLibraries/jquery.signalR', 'jquery-ui' : 'JsLibraries/jquery-ui', 'jquery.knob' : 'JsLibraries/jquery.knob', - 'jquery.easypiechart' : 'JsLibraries/jquery.easypiechart', + 'jquery.easypiechart' : 'JsLibraries/jquery.easypiechart', 'jquery.dotdotdot' : 'JsLibraries/jquery.dotdotdot', 'messenger' : 'JsLibraries/messenger', 'jquery' : 'JsLibraries/jquery', diff --git a/src/UI/jQuery/RouteBinder.js b/src/UI/jQuery/RouteBinder.js index c5ba44245..a67077a07 100644 --- a/src/UI/jQuery/RouteBinder.js +++ b/src/UI/jQuery/RouteBinder.js @@ -33,9 +33,9 @@ define( var href = event.target.getAttribute('href'); - if (!href && $target.parent('a') && $target.parent('a')[0]) { + if (!href && $target.closest('a') && $target.closest('a')[0]) { - var linkElement = $target.parent('a')[0]; + var linkElement = $target.closest('a')[0]; href = linkElement.getAttribute('href'); } @@ -53,7 +53,7 @@ define( else { //Open in new tab - window.open(href, '_blank'); + window.open('http://www.dereferer.org/?' + encodeURI(href), '_blank'); } } };