Skip to content

Commit

Permalink
Merge branch 'main' into fp/test-email
Browse files Browse the repository at this point in the history
  • Loading branch information
papafe committed Nov 10, 2023
2 parents 73cc7bc + 13135ad commit 786c597
Show file tree
Hide file tree
Showing 11 changed files with 208 additions and 138 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
## vNext (TBD)
## 11.5.0 (2023-09-15)

### Enhancements
* None

### Fixed
* None

### Compatibility
* Realm Studio: 13.0.0 or later.

### Internal
* Using Core x.y.z.

## 11.6.0 (2023-11-03)

### Enhancements
* Added the `App.EmailPasswordAuth.RetryCustomConfirmationAsync` method to be able to run again the confirmation function on the server for a given email. (Issue [#3463](https://github.com/realm/realm-dotnet/issues/3463))
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Some minimal examples of Realm use can be found in the `examples` folder:
* [QuickJournal](examples/QuickJournal): a quick journaling [MAUI](https://github.com/dotnet/maui) application that shows how Realm can be used effectively in conjunction with MVVM and data binding.
* [SimpleToDo](examples/SimpleToDoAvalonia): a simple to-do list [Avalonia](https://github.com/AvaloniaUI/Avalonia) application that shows how Realm can be used effectively in conjunction with MVVM and data binding.

It is possible to find additional (and more complex) examples that use [`Atlas Device Sync`](https://www.mongodb.com/docs/atlas/app-services/sync/) in the [`realm-dotnet-samples`](https://github.com/realm/realm-dotnet-samples) repo.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for more details!
Expand Down
2 changes: 1 addition & 1 deletion Realm/AssemblyInfo.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Product Condition="'$(Product)' == ''">Realm .NET</Product>
<VersionPrefix>11.5.0</VersionPrefix>
<VersionPrefix>11.6.0</VersionPrefix>
<Description Condition="'$(Description)' == ''">Realm is a mobile database: a replacement for SQLite</Description>
<Company>Realm Inc.</Company>
<Copyright>Copyright © $([System.DateTime]::Now.ToString(yyyy)) Realm Inc.</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Realm/Realm.Unity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "io.realm.unity",
"version": "11.5.0",
"version": "11.6.0",
"displayName": "Realm",
"description": "Realm is an embedded, object-oriented database that lets you build real-time, always-on applications. With Realm, data is directly exposed as objects and queryable by code, removing the need for ORM's riddled with performance & maintenance issues. Additionally, objects and collections in Realm are always live, meaning that they always reflect the latest data stored in the database. You can subscribe to changes, letting you keep your UI consistently up to date.\nThe .NET Realm SDK also provide access to Atlas App Services, a secure backend that can sync data between devices, authenticate and manage users, and run serverless JavaScript functions.",
"unity": "2021.1",
Expand Down
10 changes: 5 additions & 5 deletions Realm/Realm/Attributes/MapToAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace Realms
{
/// <summary>
/// An attribute that indicates that a property should be persisted under a different name.
/// An attribute that indicates that a property or a class should be persisted under a different name.
/// </summary>
/// <remarks>
/// This is useful when opening a Realm across different bindings where code style conventions might differ.
Expand All @@ -30,18 +30,18 @@ namespace Realms
public class MapToAttribute : Attribute
{
/// <summary>
/// Gets the name of the property in the database.
/// Gets the name of the property or class in the database.
/// </summary>
/// <value>The property name.</value>
/// <value>The property or class name.</value>
public string Mapping { get; }

/// <summary>
/// Initializes a new instance of the <see cref="MapToAttribute"/> class.
/// </summary>
/// <param name="mapping">The name of the property in the database.</param>
/// <param name="mapping">The name of the property or class in the database.</param>
public MapToAttribute(string mapping)
{
Mapping = mapping;
}
}
}
}
13 changes: 13 additions & 0 deletions Realm/Realm/Realm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1308,12 +1308,25 @@ public void RemoveAll()
/// 3. When using Sync, it is required that all local changes are synchronized with the server before the copy can be written.
/// This is to be sure that the file can be used as a starting point for a newly installed application.
/// The function will throw if there are pending uploads.
/// 4. Writing a copy to a flexible sync realm is not supported unless flexible sync is already enabled.
/// 5 Changing from flexible sync sync to partition based sync is not supported.
/// 6. Changing the partition to synchronize on is not supported.
/// </remarks>
/// <param name="config">Configuration, specifying the path and optionally the encryption key for the copy.</param>
public void WriteCopy(RealmConfigurationBase config)
{
Argument.NotNull(config, nameof(config));

if (config is FlexibleSyncConfiguration && Config is not FlexibleSyncConfiguration)
{
throw new NotSupportedException("Writing a copy to a flexible sync realm is not supported unless flexible sync is already enabled");
}

if (config is PartitionSyncConfiguration && Config is FlexibleSyncConfiguration)
{
throw new NotSupportedException("Changing from flexible sync sync to partition based sync is not supported when writing a Realm copy.");
}

if (Config is PartitionSyncConfiguration originalConfig && config is PartitionSyncConfiguration copiedConfig && originalConfig.Partition != copiedConfig.Partition)
{
throw new NotSupportedException($"Changing the partition to synchronize on is not supported when writing a Realm copy. Original partition: {originalConfig.Partition}, passed partition: {copiedConfig.Partition}");
Expand Down
3 changes: 2 additions & 1 deletion Tests/Realm.Tests/Sync/AppTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,13 @@ protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage reques
[Test]
public void RealmConfiguration_WithCustomHttpClientHandler_UsedWhenMakingCalls()
{
TestHelpers.RunAsyncTest(async () =>
SyncTestHelpers.RunBaasTestAsync(async () =>
{
var handler = new TestHttpClientHandler();

var app = CreateApp(new AppConfiguration("abc")
{
BaseUri = SyncTestHelpers.BaasUri!,
HttpClientHandler = handler
});

Expand Down
Loading

0 comments on commit 786c597

Please sign in to comment.