| Index: tool/input_sdk/lib/io/service_object.dart
|
| diff --git a/tool/input_sdk/lib/io/service_object.dart b/tool/input_sdk/lib/io/service_object.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..43bd6512b5fe395371fc17f427d3a7062f599ba6
|
| --- /dev/null
|
| +++ b/tool/input_sdk/lib/io/service_object.dart
|
| @@ -0,0 +1,29 @@
|
| +// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +part of dart.io;
|
| +
|
| +int _nextServiceId = 1;
|
| +
|
| +// TODO(ajohnsen): Use other way of getting a uniq id.
|
| +abstract class _ServiceObject {
|
| + int __serviceId = 0;
|
| + int get _serviceId {
|
| + if (__serviceId == 0) __serviceId = _nextServiceId++;
|
| + return __serviceId;
|
| + }
|
| +
|
| + Map _toJSON(bool ref);
|
| +
|
| + String get _servicePath => "$_serviceTypePath/$_serviceId";
|
| +
|
| + String get _serviceTypePath;
|
| +
|
| + String get _serviceTypeName;
|
| +
|
| + String _serviceType(bool ref) {
|
| + if (ref) return "@$_serviceTypeName";
|
| + return _serviceTypeName;
|
| + }
|
| +}
|
|
|