| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * *Warning*: this library is **internal**, and APIs are subject to change. | 6 * *Warning*: this library is **internal**, and APIs are subject to change. |
| 7 * | 7 * |
| 8 * Tracks observable objects for dirty checking and testing purposes. | 8 * Tracks observable objects for dirty checking and testing purposes. |
| 9 * | 9 * |
| 10 * It can collect all observed objects, which can be used to trigger predictable | 10 * It can collect all observed objects, which can be used to trigger predictable |
| 11 * delivery of all pending changes in a test, including objects allocated | 11 * delivery of all pending changes in a test, including objects allocated |
| 12 * internally to another library, such as those in `package:mdv`. | 12 * internally to another library, such as those in `package:template_binding`. |
| 13 */ | 13 */ |
| 14 library observe.src.dirty_check; | 14 library observe.src.dirty_check; |
| 15 | 15 |
| 16 import 'dart:async'; | 16 import 'dart:async'; |
| 17 import 'package:logging/logging.dart'; | 17 import 'package:logging/logging.dart'; |
| 18 import 'package:observe/observe.dart' show Observable; | 18 import 'package:observe/observe.dart' show Observable; |
| 19 | 19 |
| 20 /** The number of active observables in the system. */ | 20 /** The number of active observables in the system. */ |
| 21 int get allObservablesCount => _allObservablesCount; | 21 int get allObservablesCount => _allObservablesCount; |
| 22 | 22 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 registerUnaryCallback: wrapUnaryCallback); | 133 registerUnaryCallback: wrapUnaryCallback); |
| 134 } | 134 } |
| 135 | 135 |
| 136 /** | 136 /** |
| 137 * Forks a [Zone] off the current one that does dirty-checking automatically | 137 * Forks a [Zone] off the current one that does dirty-checking automatically |
| 138 * after each batch of async operations. Equivalent to: | 138 * after each batch of async operations. Equivalent to: |
| 139 * | 139 * |
| 140 * Zone.current.fork(specification: dirtyCheckZoneSpec()); | 140 * Zone.current.fork(specification: dirtyCheckZoneSpec()); |
| 141 */ | 141 */ |
| 142 Zone dirtyCheckZone() => Zone.current.fork(specification: dirtyCheckZoneSpec()); | 142 Zone dirtyCheckZone() => Zone.current.fork(specification: dirtyCheckZoneSpec()); |
| OLD | NEW |