def check_disposed(self):
     if self.is_disposed:
         raise DisposedException(
             'Trying to access an already disposed object')
示例#2
0
 def check_disposed(self):
     if self.is_disposed:
         raise DisposedException()
 def _subscribe(self, observer: Observer) -> Disposable:
     if self.is_disposed:
         return Observable.throw(DisposedException('Trying to access an already disposed object')) \
             .subscribe(observer)
     else:
         return self._collectionChanges.subscribe(observer)