Revert "Remove nullable on `RealmBackedResourceStore` realm parameter"

This reverts commit 09e15f5496.
This commit is contained in:
Bartłomiej Dach 2022-04-04 22:22:55 +02:00
parent 5f358a04e9
commit f73062a0d6
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ public class RealmBackedResourceStore<T> : ResourceStore<byte[]>
private readonly Live<T> liveSource;
private readonly IDisposable? realmSubscription;
public RealmBackedResourceStore(Live<T> source, IResourceStore<byte[]> underlyingStore, RealmAccess realm)
public RealmBackedResourceStore(Live<T> source, IResourceStore<byte[]> underlyingStore, RealmAccess? realm)
: base(underlyingStore)
{
liveSource = source;
@ -31,7 +31,7 @@ public RealmBackedResourceStore(Live<T> source, IResourceStore<byte[]> underlyin
invalidateCache();
Debug.Assert(fileToStoragePathMapping != null);
realmSubscription = realm.RegisterForNotifications(r => r.All<T>().Where(s => s.ID == source.ID), skinChanged);
realmSubscription = realm?.RegisterForNotifications(r => r.All<T>().Where(s => s.ID == source.ID), skinChanged);
}
protected override void Dispose(bool disposing)