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

Remove IList implementation of Realm collections #1755

Merged
merged 2 commits into from
Jun 27, 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
11 changes: 5 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
- Exposed a `ChangeSet.NewModifiedIndices` collection that contains information about the
indices of the objects that changed in the new version of the collection (i.e. after
accounting for the insertions and deletions).
- Update Fody to 3.0.

### Bug fixes
- `WriteAsync` will no longer perform a synchronous `Refresh` on the main thread. ([#1729](https://github.com/realm/realm-dotnet/pull/1729))
- Trying to add a managed Realm Object to a different instance of the same on-disk Realm will no
longer throw an exception.
- Removed the `IList` compliance for Realm collections. This fixes an issue which would cause the app to hang
on Android when deselecting an item from a ListView bound to a Realm collection.

### Breaking Changes
- `SyncConfiguration` is now deprecated and will be removed in a future version. Two new configuration
Expand All @@ -18,12 +21,8 @@ and [FullSyncConfiguration](https://docs.realm.io/platform/using-synced-realms/s
If you were using a `SyncConfiguration` with `IsPartial = true`, then change your code to use
`QueryBasedSyncConfiguration`. Similarly, if `IsPartial` was not set or was set to `false`, use
`FullSyncConfiguration`.

x.y.z (TBD)
------------------

### Enhancements
- Update Fody to 3.0.
- Removed the `IList` compliance for Realm collections. This will prevent automatic updates of ListViews
databound to Realm collections in UWP projects.

3.0.0 (2018-04-16)
------------------
Expand Down
4 changes: 0 additions & 4 deletions Realm/Realm/RealmCollectionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ namespace Realms
public abstract class RealmCollectionBase<T>
: NotificationsHelper.INotifiable,
IRealmCollection<T>,
IList,
ISchemaSource,
IThreadConfined
{
Expand Down Expand Up @@ -377,8 +376,6 @@ void NotificationsHelper.INotifiable.NotifyCallbacks(NotifiableObjectHandleBase.

public object SyncRoot => null;

object IList.this[int index] { get => this[index]; set => throw new NotSupportedException(); }

public virtual int Add(object value) => throw new NotSupportedException();

public virtual void Clear() => throw new NotSupportedException();
Expand Down Expand Up @@ -413,7 +410,6 @@ public void CopyTo(Array array, int index)
var list = (IList)array;
foreach (var obj in this)
{

list[index++] = obj;
}
}
Expand Down