-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Ad/feature/pcl/#335
- Loading branch information
Showing
103 changed files
with
10,062 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<AndroidNativeLibrary Include="../packages/Realm.0.71.1/lib/MonoAndroid44/armeabi/libwrappers.so"> | ||
<Link>../packages/Realm.0.71.1/lib/MonoAndroid44/armeabi/libwrappers.so</Link> | ||
<AndroidNativeLibrary Include="../packages/Realm.0.72.0/lib/MonoAndroid44/armeabi/libwrappers.so"> | ||
<Link>../packages/Realm.0.72.0/lib/MonoAndroid44/armeabi/libwrappers.so</Link> | ||
</AndroidNativeLibrary> | ||
<AndroidNativeLibrary Include="../packages/Realm.0.71.1/lib/MonoAndroid44/armeabi-v7a/libwrappers.so"> | ||
<Link>../packages/Realm.0.71.1/lib/MonoAndroid44/armeabi-v7a/libwrappers.so</Link> | ||
<AndroidNativeLibrary Include="../packages/Realm.0.72.0/lib/MonoAndroid44/armeabi-v7a/libwrappers.so"> | ||
<Link>../packages/Realm.0.72.0/lib/MonoAndroid44/armeabi-v7a/libwrappers.so</Link> | ||
</AndroidNativeLibrary> | ||
<AndroidNativeLibrary Include="../packages/Realm.0.71.1/lib/MonoAndroid44/x86/libwrappers.so"> | ||
<Link>../packages/Realm.0.71.1/lib/MonoAndroid44/x86/libwrappers.so</Link> | ||
<AndroidNativeLibrary Include="../packages/Realm.0.72.0/lib/MonoAndroid44/x86/libwrappers.so"> | ||
<Link>../packages/Realm.0.72.0/lib/MonoAndroid44/x86/libwrappers.so</Link> | ||
</AndroidNativeLibrary> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
|
||
// Information about this assembly is defined by the following attributes. | ||
// Change them to the values specific to your project. | ||
|
||
[assembly: AssemblyTitle("Realm.PCL")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("")] | ||
[assembly: AssemblyCopyright("andydent")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". | ||
// The form "{Major}.{Minor}.*" will automatically update the build and revision, | ||
// and "{Major}.{Minor}.{Build}.*" will update just the revision. | ||
|
||
[assembly: AssemblyVersion("1.0.*")] | ||
|
||
// The following attributes are used to specify the signing key for the assembly, | ||
// if desired. See the Mono documentation for more information about signing. | ||
|
||
//[assembly: AssemblyDelaySign(false)] | ||
//[assembly: AssemblyKeyFile("")] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?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> | ||
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<ProjectGuid>{261C8EB6-9508-4D6A-9BED-39A544AA2736}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>Realms</RootNamespace> | ||
<AssemblyName>Realm</AssemblyName> | ||
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug</OutputPath> | ||
<DefineConstants>DEBUG;</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="RealmPCLHelpers.cs" /> | ||
<Compile Include="TransactionPCL.cs" /> | ||
<Compile Include="RealmListPCL.cs" /> | ||
<Compile Include="RealmConfigurationPCL.cs" /> | ||
<Compile Include="RealmObjectPCL.cs" /> | ||
<Compile Include="RealmPCL.cs" /> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmDecryptionFailedException.cs"> | ||
<Link>Exceptions\RealmDecryptionFailedException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmException.cs"> | ||
<Link>Exceptions\RealmException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmExceptionCodes.cs"> | ||
<Link>Exceptions\RealmExceptionCodes.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmFileAccessErrorException.cs"> | ||
<Link>Exceptions\RealmFileAccessErrorException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmFileExistsException.cs"> | ||
<Link>Exceptions\RealmFileExistsException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmFileNotFoundException.cs"> | ||
<Link>Exceptions\RealmFileNotFoundException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmInvalidDatabaseException.cs"> | ||
<Link>Exceptions\RealmInvalidDatabaseException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmMigrationNeededException.cs"> | ||
<Link>Exceptions\RealmMigrationNeededException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmObjectAlreadyManagedByRealmException.cs"> | ||
<Link>Exceptions\RealmObjectAlreadyManagedByRealmException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmObjectManagedByAnotherRealmException.cs"> | ||
<Link>Exceptions\RealmObjectManagedByAnotherRealmException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmOutOfMemoryException.cs"> | ||
<Link>Exceptions\RealmOutOfMemoryException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmOutsideTransactionException.cs"> | ||
<Link>Exceptions\RealmOutsideTransactionException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\Realm.Shared\exceptions\RealmPermissionDeniedException.cs"> | ||
<Link>Exceptions\RealmPermissionDeniedException.cs</Link> | ||
</Compile> | ||
<Compile Include="RealmQueryPCL.cs" /> | ||
<Compile Include="..\Realm.Shared\Attributes.cs"> | ||
<Link>Attributes.cs</Link> | ||
</Compile> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> | ||
<ItemGroup> | ||
<Folder Include="Exceptions\" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
/* Copyright 2015 Realm Inc - All Rights Reserved | ||
* Proprietary and Confidential | ||
*/ | ||
|
||
/// PROXY VERSION OF CLASS USED IN PCL FOR BAIT AND SWITCH PATTERN | ||
|
||
using System; | ||
using System.IO; | ||
|
||
// see internals/RealmConfigurations.md for a detailed diagram of how this interacts with the ObjectStore configuration | ||
|
||
namespace Realms | ||
{ | ||
|
||
/// <summary> | ||
/// Realm configuration specifying settings that affect your Realm behaviour. | ||
/// </summary> | ||
/// <remarks> | ||
/// Main role is generating a canonical path from whatever absolute, relative subdir or just filename user supplies. | ||
/// </remarks> | ||
public class RealmConfiguration | ||
{ | ||
/// <summary> | ||
/// Standard filename to be combined with the platform-specific document directory. | ||
/// </summary> | ||
/// <value>A string representing a filename only, no path.</value> | ||
public static string DefaultRealmName => "default.realm"; | ||
|
||
/// <summary> | ||
/// Constant used for SchemaVersion to indicate is not versioned. | ||
/// </summary> | ||
/// <remarks> | ||
/// Must be maintained to match an internal ObjectStore::NotVersioned. | ||
/// </remarks> | ||
/// <value>Maximum value of UInt64.</value> | ||
public static UInt64 NotVersioned => UInt64.MaxValue; | ||
|
||
/// <summary> | ||
/// Flag mainly to help with temp databases and testing, indicates content can be abandoned when you change the schema. | ||
/// </summary> | ||
public readonly bool ShouldDeleteIfMigrationNeeded; | ||
|
||
/// <summary> | ||
/// The full path of any realms opened with this configuration, may be overriden by passing in a separate name. | ||
/// </summary> | ||
public string DatabasePath {get; private set;} | ||
|
||
/// <summary> | ||
/// Utility to build a path in which a realm will be created so can consistently use filenames and relative paths. | ||
/// </summary> | ||
public static string PathToRealm(string optionalPath = null) | ||
{ | ||
RealmPCLHelpers.ThrowProxyShouldNeverBeUsed(); | ||
return ""; | ||
} | ||
|
||
/// <summary> | ||
/// Number indicating the version, can be used to arbitrarily distinguish between schemas even if they have the same objects and properties. | ||
/// </summary> | ||
/// <value>0-based value initially set to indicate user is not versioning.</value> | ||
public UInt64 SchemaVersion { get; set;} = RealmConfiguration.NotVersioned; | ||
|
||
/// <summary> | ||
/// Configuration you can override which is used when you create a new Realm without specifying a configuration. | ||
/// </summary> | ||
public static RealmConfiguration DefaultConfiguration { set; get;} = new RealmConfiguration(); | ||
|
||
/// <summary> | ||
/// Constructor allowing path override. | ||
/// </summary> | ||
/// <param name="optionalPath">Path to the realm, must be a valid full path for the current platform, relative subdir, or just filename.</param> | ||
/// <param name="shouldDeleteIfMigrationNeeded">Optional Flag mainly to help with temp databases and testing, indicates content can be abandoned when you change the schema.</param> | ||
public RealmConfiguration(string optionalPath = null, bool shouldDeleteIfMigrationNeeded=false) | ||
{ | ||
RealmPCLHelpers.ThrowProxyShouldNeverBeUsed(); | ||
} | ||
|
||
/// <summary> | ||
/// Clone method allowing you to override or customise the current path. | ||
/// </summary> | ||
/// <returns>An object with a fully-specified, canonical path.</returns> | ||
/// <param name="newConfigPath">Path to the realm, must be a valid full path for the current platform, relative subdir, or just filename.</param> | ||
public RealmConfiguration ConfigWithPath(string newConfigPath) | ||
{ | ||
RealmPCLHelpers.ThrowProxyShouldNeverBeUsed(); | ||
return null; | ||
} | ||
|
||
/// <summary> | ||
/// Generic override determines whether the specified <see cref="System.Object"/> is equal to the current RealmConfiguration. | ||
/// </summary> | ||
/// <param name="rhs">The <see cref="System.Object"/> to compare with the current RealmConfiguration.</param> | ||
/// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to the current | ||
/// <see cref="Realms.RealmConfiguration"/>; otherwise, <c>false</c>.</returns> | ||
public override bool Equals(Object rhs) | ||
{ | ||
RealmPCLHelpers.ThrowProxyShouldNeverBeUsed(); | ||
return false; | ||
} | ||
|
||
|
||
|
||
/// <summary> | ||
/// Determines whether the specified RealmConfiguration is equal to the current RealmConfiguration. | ||
/// </summary> | ||
/// <param name="rhs">The <see cref="System.Object"/> to compare with the current RealmConfiguration.</param> | ||
/// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to the current | ||
/// <see cref="Realms.RealmConfiguration"/>; otherwise, <c>false</c>.</returns> | ||
public bool Equals(RealmConfiguration rhs) | ||
{ | ||
RealmPCLHelpers.ThrowProxyShouldNeverBeUsed(); | ||
return false; | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Serves as a hash function for a RealmConfiguration based on its path. | ||
/// </summary> | ||
/// <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a | ||
/// hash table.</returns> | ||
public override int GetHashCode() | ||
{ | ||
RealmPCLHelpers.ThrowProxyShouldNeverBeUsed(); | ||
return 0; | ||
} | ||
|
||
} // class RealmConfiguration | ||
} // namespace Realms | ||
|
Oops, something went wrong.