mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-27 03:41:29 +01:00
allow equality comparison on ListMonitor and ObjectMonitor to help distinguish senders when observing multiple monitors
This commit is contained in:
@@ -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
|
// MARK: - ListMonitor: FetchedResultsControllerHandler
|
||||||
|
|
||||||
extension 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
|
// MARK: - ObjectMonitor: FetchedResultsControllerHandler
|
||||||
|
|
||||||
extension ObjectMonitor: FetchedResultsControllerHandler {
|
extension ObjectMonitor: FetchedResultsControllerHandler {
|
||||||
|
|||||||
Reference in New Issue
Block a user