2022-01-23 10:42:26 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Specialized;
|
|
|
|
using System.ComponentModel;
|
|
|
|
using Realms;
|
|
|
|
using Realms.Schema;
|
|
|
|
|
|
|
|
namespace osu.Game.Database
|
|
|
|
{
|
|
|
|
public class EmptyRealmSet<T> : IRealmCollection<T>
|
|
|
|
{
|
2022-01-23 14:17:33 +00:00
|
|
|
private IList<T> emptySet => Array.Empty<T>();
|
2022-01-23 10:42:26 +00:00
|
|
|
|
2022-01-23 14:17:33 +00:00
|
|
|
public IEnumerator<T> GetEnumerator() => emptySet.GetEnumerator();
|
|
|
|
IEnumerator IEnumerable.GetEnumerator() => emptySet.GetEnumerator();
|
2022-01-23 10:42:26 +00:00
|
|
|
public int Count => emptySet.Count;
|
|
|
|
public T this[int index] => emptySet[index];
|
2022-01-23 14:17:33 +00:00
|
|
|
public int IndexOf(object item) => emptySet.IndexOf((T)item);
|
|
|
|
public bool Contains(object item) => emptySet.Contains((T)item);
|
2022-01-23 10:42:26 +00:00
|
|
|
|
|
|
|
public event NotifyCollectionChangedEventHandler? CollectionChanged
|
|
|
|
{
|
|
|
|
add => throw new NotImplementedException();
|
|
|
|
remove => throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler? PropertyChanged
|
|
|
|
{
|
|
|
|
add => throw new NotImplementedException();
|
|
|
|
remove => throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
2022-01-23 14:17:33 +00:00
|
|
|
public IRealmCollection<T> Freeze() => throw new NotImplementedException();
|
|
|
|
public IDisposable SubscribeForNotifications(NotificationCallbackDelegate<T> callback) => throw new NotImplementedException();
|
2022-01-23 10:42:26 +00:00
|
|
|
public bool IsValid => throw new NotImplementedException();
|
|
|
|
public Realm Realm => throw new NotImplementedException();
|
|
|
|
public ObjectSchema ObjectSchema => throw new NotImplementedException();
|
|
|
|
public bool IsFrozen => throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|