Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ShouldCompactOnLaunch to the PCL RealmConfig #1768

Merged
merged 4 commits into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ for most certificates. Notably, it will now work out of the box for Realm Cloud

### Bug fixes
- When constructing queries that compare an invalid/unmanaged RealmObject (e.g. `realm.All<Foo>().Where(f => f.Bar == someBar)`),
a meaningful exception will now be thrown rather than an obscure ArgumentNullException.
a meaningful exception will now be thrown rather than an obscure ArgumentNullException.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to the issues numbers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that entry belongs to en earlier PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've stopped including issue/PR numbers in the .NET changelog a few versions ago. Let's discuss the pros/cons offline.

- Added `ShouldCompactOnLaunch` to the PCL version of the library. ([dotnet-private#125](https://github.com/realm/realm-dotnet-private/issues/125))

### Breaking Changes

Expand Down
9 changes: 9 additions & 0 deletions Platform.PCL/Realm.PCL/RealmConfigurationPCL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ public class RealmConfiguration : RealmConfigurationBase
/// </value>
public MigrationCallbackDelegate MigrationCallback { get; set; }

/// <summary>
/// Gets or sets the compact on launch callback.
/// </summary>
/// <value>
/// The <see cref="ShouldCompactDelegate"/> that will be invoked when opening a Realm for the first time
/// to determine if it should be compacted before being returned to the user.
/// </value>
public ShouldCompactDelegate ShouldCompactOnLaunch { get; set; }

/// <summary>
/// Gets or sets the <see cref="RealmConfigurationBase"/> that is used when creating a new <see cref="Realm"/> without specifying a configuration.
/// </summary>
Expand Down