We are using Realm in Xamarin Forms app on Windows 10 and recently we have upgraded to latest version and replaced the RealmObject class with IRealmObject Interface and made correspodning changes.
RealmObject class overrides the Equal method which is not available in the auto generated classes of the models which implements the IRealmObject interface.
Is it completly removed or we can find it somewhere in the auto generated code using some setting or any method? or we have to override it in our relam classes and provide our own implementation?
it was something like this
public override bool Equals(object ob){
if(obj is null)
{
return false;
}
if(ReferenceEqual(this,obj))
{
return true;
}
if(obj is InvalidObject)
{
return !IsValid;
}
if(obj is not IRealmObjectBase iro)
{
return false;
}
return _accessor.Equals(iro.Accessor);
}
Can we achieve this with IRealmObject implementation?