OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 import 'dart:async'; |
| 6 |
| 7 import 'package_resolver.dart'; |
| 8 import 'sync_package_resolver.dart'; |
| 9 |
| 10 /// An implementation of [PackageResolver] that wraps a [SyncPackageResolver]. |
| 11 class AsyncPackageResolver implements PackageResolver { |
| 12 /// The wrapped [SyncPackageResolver]. |
| 13 final SyncPackageResolver _inner; |
| 14 |
| 15 AsyncPackageResolver(this._inner); |
| 16 |
| 17 Future<Map<String, Uri>> get packageConfigMap async => |
| 18 _inner.packageConfigMap; |
| 19 |
| 20 Future<Uri> get packageConfigUri async => _inner.packageConfigUri; |
| 21 Future<Uri> get packageRoot async => _inner.packageRoot; |
| 22 Future<SyncPackageResolver> get asSync async => _inner; |
| 23 Future<String> get processArgument async => _inner.processArgument; |
| 24 |
| 25 Future<Uri> resolveUri(packageUri) async => _inner.resolveUri(packageUri); |
| 26 Future<Uri> urlFor(String package, [String path]) async => |
| 27 _inner.urlFor(package, path); |
| 28 Future<Uri> packageUriFor(url) async => _inner.packageUriFor(url); |
| 29 Future<String> packagePath(String package) async => |
| 30 _inner.packagePath(package); |
| 31 } |
OLD | NEW |