mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-11-13 12:23:32 +01:00
allow equality comparison on ListMonitor and ObjectMonitor to help distinguish senders when observing multiple monitors
This commit is contained in:
1 parent
3348aa0bef
commit
71477c0839
2 files changed
+20
No files matched your search
@@ -729,6 +729,16 @@ public final class ListMonitor<T: NSManagedObject> {
|
||||
}
|
||||
|
||||
|
||||
// MARK: - ListMonitor: Equatable
|
||||
|
||||
public func ==<T: NSManagedObject>(lhs: ListMonitor<T>, rhs: ListMonitor<T>) -> Bool {
|
||||
|
||||
return lhs === rhs
|
||||
}
|
||||
|
||||
extension ListMonitor: Equatable { }
|
||||
|
||||
|
||||
// MARK: - ListMonitor: FetchedResultsControllerHandler
|
||||
|
||||
extension ListMonitor: FetchedResultsControllerHandler {
|
||||
|
||||
@@ -261,6 +261,16 @@ public final class ObjectMonitor<T: NSManagedObject> {
|
||||
}
|
||||
|
||||
|
||||
// MARK: - ObjectMonitor: Equatable
|
||||
|
||||
public func ==<T: NSManagedObject>(lhs: ObjectMonitor<T>, rhs: ObjectMonitor<T>) -> Bool {
|
||||
|
||||
return lhs === rhs
|
||||
}
|
||||
|
||||
extension ObjectMonitor: Equatable { }
|
||||
|
||||
|
||||
// MARK: - ObjectMonitor: FetchedResultsControllerHandler
|
||||
|
||||
extension ObjectMonitor: FetchedResultsControllerHandler {
|
||||
|
||||
Reference in new issue
Block a user