Skip to content

Commit

Permalink
Remove IList implementation of Realm collections (#1755)
Browse files Browse the repository at this point in the history
* Remove IList implementation of Realm collections

* Fix build
  • Loading branch information
nirinchev committed Jun 27, 2018
1 parent 7556567 commit c996fab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
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

0 comments on commit c996fab

Please sign in to comment.