OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 part of service; | 5 part of service; |
6 | 6 |
7 /// An RpcException represents an exceptional event that happened | 7 /// An RpcException represents an exceptional event that happened |
8 /// while invoking an rpc. | 8 /// while invoking an rpc. |
9 abstract class RpcException implements Exception { | 9 abstract class RpcException implements Exception { |
10 RpcException(this.message); | 10 RpcException(this.message); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 bool get isMessage => type == 'Message'; | 107 bool get isMessage => type == 'Message'; |
108 | 108 |
109 // Kinds of Instance. | 109 // Kinds of Instance. |
110 bool get isAbstractType => false; | 110 bool get isAbstractType => false; |
111 bool get isNull => false; | 111 bool get isNull => false; |
112 bool get isBool => false; | 112 bool get isBool => false; |
113 bool get isDouble => false; | 113 bool get isDouble => false; |
114 bool get isString => false; | 114 bool get isString => false; |
115 bool get isInt => false; | 115 bool get isInt => false; |
116 bool get isList => false; | 116 bool get isList => false; |
| 117 bool get isMap => false; |
117 bool get isMirrorReference => false; | 118 bool get isMirrorReference => false; |
118 bool get isWeakProperty => false; | 119 bool get isWeakProperty => false; |
119 bool get isClosure => false; | 120 bool get isClosure => false; |
120 bool get isPlainInstance => false; | 121 bool get isPlainInstance => false; |
121 | 122 |
122 /// Has this object been fully loaded? | 123 /// Has this object been fully loaded? |
123 bool get loaded => _loaded; | 124 bool get loaded => _loaded; |
124 bool _loaded = false; | 125 bool _loaded = false; |
125 // TODO(turnidge): Make loaded observable and get rid of loading | 126 // TODO(turnidge): Make loaded observable and get rid of loading |
126 // from Isolate. | 127 // from Isolate. |
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 bool get isAbstractType { | 1802 bool get isAbstractType { |
1802 return (kind == 'Type' || kind == 'TypeRef' || | 1803 return (kind == 'Type' || kind == 'TypeRef' || |
1803 kind == 'TypeParameter' || kind == 'BoundedType'); | 1804 kind == 'TypeParameter' || kind == 'BoundedType'); |
1804 } | 1805 } |
1805 bool get isNull => kind == 'Null'; | 1806 bool get isNull => kind == 'Null'; |
1806 bool get isBool => kind == 'Bool'; | 1807 bool get isBool => kind == 'Bool'; |
1807 bool get isDouble => kind == 'Double'; | 1808 bool get isDouble => kind == 'Double'; |
1808 bool get isString => kind == 'String'; | 1809 bool get isString => kind == 'String'; |
1809 bool get isInt => kind == 'Int'; | 1810 bool get isInt => kind == 'Int'; |
1810 bool get isList => kind == 'List'; | 1811 bool get isList => kind == 'List'; |
| 1812 bool get isMap => kind == 'Map'; |
1811 bool get isMirrorReference => kind == 'MirrorReference'; | 1813 bool get isMirrorReference => kind == 'MirrorReference'; |
1812 bool get isWeakProperty => kind == 'WeakProperty'; | 1814 bool get isWeakProperty => kind == 'WeakProperty'; |
1813 bool get isClosure => kind == 'Closure'; | 1815 bool get isClosure => kind == 'Closure'; |
1814 | 1816 |
1815 // TODO(turnidge): Is this properly backwards compatible when new | 1817 // TODO(turnidge): Is this properly backwards compatible when new |
1816 // instance kinds are added? | 1818 // instance kinds are added? |
1817 bool get isPlainInstance => kind == 'PlainInstance'; | 1819 bool get isPlainInstance => kind == 'PlainInstance'; |
1818 | 1820 |
1819 Instance._empty(ServiceObjectOwner owner) : super._empty(owner); | 1821 Instance._empty(ServiceObjectOwner owner) : super._empty(owner); |
1820 | 1822 |
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3160 var v = list[i]; | 3162 var v = list[i]; |
3161 if ((v is ObservableMap) && _isServiceMap(v)) { | 3163 if ((v is ObservableMap) && _isServiceMap(v)) { |
3162 list[i] = owner.getFromMap(v); | 3164 list[i] = owner.getFromMap(v); |
3163 } else if (v is ObservableList) { | 3165 } else if (v is ObservableList) { |
3164 _upgradeObservableList(v, owner); | 3166 _upgradeObservableList(v, owner); |
3165 } else if (v is ObservableMap) { | 3167 } else if (v is ObservableMap) { |
3166 _upgradeObservableMap(v, owner); | 3168 _upgradeObservableMap(v, owner); |
3167 } | 3169 } |
3168 } | 3170 } |
3169 } | 3171 } |
OLD | NEW |